1 # 0 "ssl/ssl_lib.c"
2 # 0 "<built-in>"
3 # 0 "<command-line>"
4 # 1 "/usr/include/stdc-predef.h" 1 3 4
5 # 0 "<command-line>" 2
6 # 1 "ssl/ssl_lib.c"
7 # 12 "ssl/ssl_lib.c"
8 # 1 "/usr/include/stdio.h" 1 3 4
9 # 28 "/usr/include/stdio.h" 3 4
10 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4
11 # 33 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4
12 # 1 "/usr/include/features.h" 1 3 4
13 # 394 "/usr/include/features.h" 3 4
14 # 1 "/usr/include/features-time64.h" 1 3 4
15 # 20 "/usr/include/features-time64.h" 3 4
16 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
17 # 21 "/usr/include/features-time64.h" 2 3 4
18 # 1 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 1 3 4
19 # 19 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 3 4
20 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
21 # 20 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 2 3 4
22 # 22 "/usr/include/features-time64.h" 2 3 4
23 # 395 "/usr/include/features.h" 2 3 4
24 # 502 "/usr/include/features.h" 3 4
25 # 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4
26 # 576 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4
27 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
28 # 577 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4
29 # 1 "/usr/include/x86_64-linux-gnu/bits/long-double.h" 1 3 4
30 # 578 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4
31 # 503 "/usr/include/features.h" 2 3 4
32 # 526 "/usr/include/features.h" 3 4
33 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4
34 # 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4
35 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4
36 # 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4
37 # 527 "/usr/include/features.h" 2 3 4
38 # 34 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 2 3 4
39 # 29 "/usr/include/stdio.h" 2 3 4
40
41
42
43
44
45 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
46 # 214 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 3 4
47
48 # 214 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 3 4
49 typedef long unsigned int size_t;
50 # 35 "/usr/include/stdio.h" 2 3 4
51
52
53 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdarg.h" 1 3 4
54 # 40 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdarg.h" 3 4
55 typedef __builtin_va_list __gnuc_va_list;
56 # 38 "/usr/include/stdio.h" 2 3 4
57
58 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4
59 # 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4
60 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
61 # 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
62 # 1 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 1 3 4
63 # 19 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 3 4
64 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
65 # 20 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 2 3 4
66 # 29 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
67
68
69 typedef unsigned char __u_char;
70 typedef unsigned short int __u_short;
71 typedef unsigned int __u_int;
72 typedef unsigned long int __u_long;
73
74
75 typedef signed char __int8_t;
76 typedef unsigned char __uint8_t;
77 typedef signed short int __int16_t;
78 typedef unsigned short int __uint16_t;
79 typedef signed int __int32_t;
80 typedef unsigned int __uint32_t;
81
82 typedef signed long int __int64_t;
83 typedef unsigned long int __uint64_t;
84
85
86
87
88
89
90 typedef __int8_t __int_least8_t;
91 typedef __uint8_t __uint_least8_t;
92 typedef __int16_t __int_least16_t;
93 typedef __uint16_t __uint_least16_t;
94 typedef __int32_t __int_least32_t;
95 typedef __uint32_t __uint_least32_t;
96 typedef __int64_t __int_least64_t;
97 typedef __uint64_t __uint_least64_t;
98
99
100
101 typedef long int __quad_t;
102 typedef unsigned long int __u_quad_t;
103
104
105
106
107
108
109
110 typedef long int __intmax_t;
111 typedef unsigned long int __uintmax_t;
112 # 141 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4
113 # 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4
114 # 142 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
115 # 1 "/usr/include/x86_64-linux-gnu/bits/time64.h" 1 3 4
116 # 143 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
117
118
119 typedef unsigned long int __dev_t;
120 typedef unsigned int __uid_t;
121 typedef unsigned int __gid_t;
122 typedef unsigned long int __ino_t;
123 typedef unsigned long int __ino64_t;
124 typedef unsigned int __mode_t;
125 typedef unsigned long int __nlink_t;
126 typedef long int __off_t;
127 typedef long int __off64_t;
128 typedef int __pid_t;
129 typedef struct { int __val[2]; } __fsid_t;
130 typedef long int __clock_t;
131 typedef unsigned long int __rlim_t;
132 typedef unsigned long int __rlim64_t;
133 typedef unsigned int __id_t;
134 typedef long int __time_t;
135 typedef unsigned int __useconds_t;
136 typedef long int __suseconds_t;
137 typedef long int __suseconds64_t;
138
139 typedef int __daddr_t;
140 typedef int __key_t;
141
142
143 typedef int __clockid_t;
144
145
146 typedef void * __timer_t;
147
148
149 typedef long int __blksize_t;
150
151
152
153
154 typedef long int __blkcnt_t;
155 typedef long int __blkcnt64_t;
156
157
158 typedef unsigned long int __fsblkcnt_t;
159 typedef unsigned long int __fsblkcnt64_t;
160
161
162 typedef unsigned long int __fsfilcnt_t;
163 typedef unsigned long int __fsfilcnt64_t;
164
165
166 typedef long int __fsword_t;
167
168 typedef long int __ssize_t;
169
170
171 typedef long int __syscall_slong_t;
172
173 typedef unsigned long int __syscall_ulong_t;
174
175
176
177 typedef __off64_t __loff_t;
178 typedef char *__caddr_t;
179
180
181 typedef long int __intptr_t;
182
183
184 typedef unsigned int __socklen_t;
185
186
187
188
189 typedef int __sig_atomic_t;
190 # 40 "/usr/include/stdio.h" 2 3 4
191 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 1 3 4
192
193
194
195
196 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 1 3 4
197 # 13 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 3 4
198 typedef struct
199 {
200 int __count;
201 union
202 {
203 unsigned int __wch;
204 char __wchb[4];
205 } __value;
206 } __mbstate_t;
207 # 6 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 2 3 4
208
209
210
211
212 typedef struct _G_fpos_t
213 {
214 __off_t __pos;
215 __mbstate_t __state;
216 } __fpos_t;
217 # 41 "/usr/include/stdio.h" 2 3 4
218 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 1 3 4
219 # 10 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 3 4
220 typedef struct _G_fpos64_t
221 {
222 __off64_t __pos;
223 __mbstate_t __state;
224 } __fpos64_t;
225 # 42 "/usr/include/stdio.h" 2 3 4
226 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__FILE.h" 1 3 4
227
228
229
230 struct _IO_FILE;
231 typedef struct _IO_FILE __FILE;
232 # 43 "/usr/include/stdio.h" 2 3 4
233 # 1 "/usr/include/x86_64-linux-gnu/bits/types/FILE.h" 1 3 4
234
235
236
237 struct _IO_FILE;
238
239
240 typedef struct _IO_FILE FILE;
241 # 44 "/usr/include/stdio.h" 2 3 4
242 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 1 3 4
243 # 35 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 3 4
244 struct _IO_FILE;
245 struct _IO_marker;
246 struct _IO_codecvt;
247 struct _IO_wide_data;
248
249
250
251
252 typedef void _IO_lock_t;
253
254
255
256
257
258 struct _IO_FILE
259 {
260 int _flags;
261
262
263 char *_IO_read_ptr;
264 char *_IO_read_end;
265 char *_IO_read_base;
266 char *_IO_write_base;
267 char *_IO_write_ptr;
268 char *_IO_write_end;
269 char *_IO_buf_base;
270 char *_IO_buf_end;
271
272
273 char *_IO_save_base;
274 char *_IO_backup_base;
275 char *_IO_save_end;
276
277 struct _IO_marker *_markers;
278
279 struct _IO_FILE *_chain;
280
281 int _fileno;
282 int _flags2;
283 __off_t _old_offset;
284
285
286 unsigned short _cur_column;
287 signed char _vtable_offset;
288 char _shortbuf[1];
289
290 _IO_lock_t *_lock;
291
292
293
294
295
296
297
298 __off64_t _offset;
299
300 struct _IO_codecvt *_codecvt;
301 struct _IO_wide_data *_wide_data;
302 struct _IO_FILE *_freeres_list;
303 void *_freeres_buf;
304 size_t __pad5;
305 int _mode;
306
307 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
308 };
309 # 45 "/usr/include/stdio.h" 2 3 4
310
311
312 # 1 "/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h" 1 3 4
313 # 27 "/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h" 3 4
314 typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf,
315 size_t __nbytes);
316
317
318
319
320
321
322
323 typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf,
324 size_t __nbytes);
325
326
327
328
329
330
331
332 typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w);
333
334
335 typedef int cookie_close_function_t (void *__cookie);
336
337
338
339
340
341
342 typedef struct _IO_cookie_io_functions_t
343 {
344 cookie_read_function_t *read;
345 cookie_write_function_t *write;
346 cookie_seek_function_t *seek;
347 cookie_close_function_t *close;
348 } cookie_io_functions_t;
349 # 48 "/usr/include/stdio.h" 2 3 4
350
351
352
353
354
355 typedef __gnuc_va_list va_list;
356 # 64 "/usr/include/stdio.h" 3 4
357 typedef __off_t off_t;
358 # 78 "/usr/include/stdio.h" 3 4
359 typedef __ssize_t ssize_t;
360
361
362
363
364
365
366 typedef __fpos_t fpos_t;
367 # 129 "/usr/include/stdio.h" 3 4
368 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4
369 # 130 "/usr/include/stdio.h" 2 3 4
370 # 149 "/usr/include/stdio.h" 3 4
371 extern FILE *stdin;
372 extern FILE *stdout;
373 extern FILE *stderr;
374
375
376
377
378
379
380 extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__));
381
382 extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__));
383
384
385
386 extern int renameat (int __oldfd, const char *__old, int __newfd,
387 const char *__new) __attribute__ ((__nothrow__ , __leaf__));
388 # 184 "/usr/include/stdio.h" 3 4
389 extern int fclose (FILE *__stream) __attribute__ ((__nonnull__ (1)));
390 # 194 "/usr/include/stdio.h" 3 4
391 extern FILE *tmpfile (void)
392 __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
393 # 211 "/usr/include/stdio.h" 3 4
394 extern char *tmpnam (char[20]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
395
396
397
398
399 extern char *tmpnam_r (char __s[20]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
400 # 228 "/usr/include/stdio.h" 3 4
401 extern char *tempnam (const char *__dir, const char *__pfx)
402 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__malloc__ (__builtin_free, 1)));
403
404
405
406
407
408
409 extern int fflush (FILE *__stream);
410 # 245 "/usr/include/stdio.h" 3 4
411 extern int fflush_unlocked (FILE *__stream);
412 # 264 "/usr/include/stdio.h" 3 4
413 extern FILE *fopen (const char *__restrict __filename,
414 const char *__restrict __modes)
415 __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
416
417
418
419
420 extern FILE *freopen (const char *__restrict __filename,
421 const char *__restrict __modes,
422 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (3)));
423 # 299 "/usr/include/stdio.h" 3 4
424 extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__))
425 __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
426
427
428
429
430
431 extern FILE *fopencookie (void *__restrict __magic_cookie,
432 const char *__restrict __modes,
433 cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__ , __leaf__))
434 __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
435
436
437
438
439 extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
440 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
441
442
443
444
445 extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__))
446 __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
447 # 334 "/usr/include/stdio.h" 3 4
448 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__))
449 __attribute__ ((__nonnull__ (1)));
450
451
452
453 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
454 int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
455
456
457
458
459 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
460 size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
461
462
463 extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
464
465
466
467
468
469
470
471 extern int fprintf (FILE *__restrict __stream,
472 const char *__restrict __format, ...) __attribute__ ((__nonnull__ (1)));
473
474
475
476
477 extern int printf (const char *__restrict __format, ...);
478
479 extern int sprintf (char *__restrict __s,
480 const char *__restrict __format, ...) __attribute__ ((__nothrow__));
481
482
483
484
485
486 extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
487 __gnuc_va_list __arg) __attribute__ ((__nonnull__ (1)));
488
489
490
491
492 extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
493
494 extern int vsprintf (char *__restrict __s, const char *__restrict __format,
495 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
496
497
498
499 extern int snprintf (char *__restrict __s, size_t __maxlen,
500 const char *__restrict __format, ...)
501 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
502
503 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
504 const char *__restrict __format, __gnuc_va_list __arg)
505 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
506
507
508
509
510
511 extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
512 __gnuc_va_list __arg)
513 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__));
514 extern int __asprintf (char **__restrict __ptr,
515 const char *__restrict __fmt, ...)
516 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
517 extern int asprintf (char **__restrict __ptr,
518 const char *__restrict __fmt, ...)
519 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
520
521
522
523
524 extern int vdprintf (int __fd, const char *__restrict __fmt,
525 __gnuc_va_list __arg)
526 __attribute__ ((__format__ (__printf__, 2, 0)));
527 extern int dprintf (int __fd, const char *__restrict __fmt, ...)
528 __attribute__ ((__format__ (__printf__, 2, 3)));
529
530
531
532
533
534
535
536 extern int fscanf (FILE *__restrict __stream,
537 const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1)));
538
539
540
541
542 extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
543
544 extern int sscanf (const char *__restrict __s,
545 const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__));
546
547
548
549
550
551 # 1 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 1 3 4
552 # 119 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4
553 # 1 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 1 3 4
554 # 24 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4
555 # 1 "/usr/include/x86_64-linux-gnu/bits/long-double.h" 1 3 4
556 # 25 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 2 3 4
557 # 120 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 2 3 4
558 # 438 "/usr/include/stdio.h" 2 3 4
559 # 463 "/usr/include/stdio.h" 3 4
560 extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf")
561
562 __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1)));
563 extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf")
564 __attribute__ ((__warn_unused_result__));
565 extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ , __leaf__))
566
567 ;
568 # 490 "/usr/include/stdio.h" 3 4
569 extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
570 __gnuc_va_list __arg)
571 __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1)));
572
573
574
575
576
577 extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
578 __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
579
580
581 extern int vsscanf (const char *__restrict __s,
582 const char *__restrict __format, __gnuc_va_list __arg)
583 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
584 # 540 "/usr/include/stdio.h" 3 4
585 extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")
586
587
588
589 __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1)));
590 extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")
591
592 __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
593 extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ , __leaf__))
594
595
596
597 __attribute__ ((__format__ (__scanf__, 2, 0)));
598 # 575 "/usr/include/stdio.h" 3 4
599 extern int fgetc (FILE *__stream) __attribute__ ((__nonnull__ (1)));
600 extern int getc (FILE *__stream) __attribute__ ((__nonnull__ (1)));
601
602
603
604
605
606 extern int getchar (void);
607
608
609
610
611
612
613 extern int getc_unlocked (FILE *__stream) __attribute__ ((__nonnull__ (1)));
614 extern int getchar_unlocked (void);
615 # 600 "/usr/include/stdio.h" 3 4
616 extern int fgetc_unlocked (FILE *__stream) __attribute__ ((__nonnull__ (1)));
617 # 611 "/usr/include/stdio.h" 3 4
618 extern int fputc (int __c, FILE *__stream) __attribute__ ((__nonnull__ (2)));
619 extern int putc (int __c, FILE *__stream) __attribute__ ((__nonnull__ (2)));
620
621
622
623
624
625 extern int putchar (int __c);
626 # 627 "/usr/include/stdio.h" 3 4
627 extern int fputc_unlocked (int __c, FILE *__stream) __attribute__ ((__nonnull__ (2)));
628
629
630
631
632
633
634
635 extern int putc_unlocked (int __c, FILE *__stream) __attribute__ ((__nonnull__ (2)));
636 extern int putchar_unlocked (int __c);
637
638
639
640
641
642
643 extern int getw (FILE *__stream) __attribute__ ((__nonnull__ (1)));
644
645
646 extern int putw (int __w, FILE *__stream) __attribute__ ((__nonnull__ (2)));
647
648
649
650
651
652
653
654 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
655 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1))) __attribute__ ((__nonnull__ (3)));
656 # 694 "/usr/include/stdio.h" 3 4
657 extern __ssize_t __getdelim (char **__restrict __lineptr,
658 size_t *__restrict __n, int __delimiter,
659 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (4)));
660 extern __ssize_t getdelim (char **__restrict __lineptr,
661 size_t *__restrict __n, int __delimiter,
662 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (4)));
663
664
665
666
667
668
669
670 extern __ssize_t getline (char **__restrict __lineptr,
671 size_t *__restrict __n,
672 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (3)));
673
674
675
676
677
678
679
680 extern int fputs (const char *__restrict __s, FILE *__restrict __stream)
681 __attribute__ ((__nonnull__ (2)));
682
683
684
685
686
687 extern int puts (const char *__s);
688
689
690
691
692
693
694 extern int ungetc (int __c, FILE *__stream) __attribute__ ((__nonnull__ (2)));
695
696
697
698
699
700
701 extern size_t fread (void *__restrict __ptr, size_t __size,
702 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__))
703 __attribute__ ((__nonnull__ (4)));
704
705
706
707
708 extern size_t fwrite (const void *__restrict __ptr, size_t __size,
709 size_t __n, FILE *__restrict __s) __attribute__ ((__nonnull__ (4)));
710 # 766 "/usr/include/stdio.h" 3 4
711 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
712 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__))
713 __attribute__ ((__nonnull__ (4)));
714 extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
715 size_t __n, FILE *__restrict __stream)
716 __attribute__ ((__nonnull__ (4)));
717
718
719
720
721
722
723
724 extern int fseek (FILE *__stream, long int __off, int __whence)
725 __attribute__ ((__nonnull__ (1)));
726
727
728
729
730 extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1)));
731
732
733
734
735 extern void rewind (FILE *__stream) __attribute__ ((__nonnull__ (1)));
736 # 803 "/usr/include/stdio.h" 3 4
737 extern int fseeko (FILE *__stream, __off_t __off, int __whence)
738 __attribute__ ((__nonnull__ (1)));
739
740
741
742
743 extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1)));
744 # 829 "/usr/include/stdio.h" 3 4
745 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos)
746 __attribute__ ((__nonnull__ (1)));
747
748
749
750
751 extern int fsetpos (FILE *__stream, const fpos_t *__pos) __attribute__ ((__nonnull__ (1)));
752 # 860 "/usr/include/stdio.h" 3 4
753 extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
754
755 extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1)));
756
757 extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1)));
758
759
760
761 extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
762 extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1)));
763 extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1)));
764
765
766
767
768
769
770
771 extern void perror (const char *__s) __attribute__ ((__cold__));
772
773
774
775
776 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1)));
777
778
779
780
781 extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1)));
782 # 897 "/usr/include/stdio.h" 3 4
783 extern int pclose (FILE *__stream) __attribute__ ((__nonnull__ (1)));
784
785
786
787
788
789 extern FILE *popen (const char *__command, const char *__modes)
790 __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (pclose, 1))) __attribute__ ((__warn_unused_result__));
791
792
793
794
795
796
797 extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__))
798 __attribute__ ((__access__ (__write_only__, 1)));
799 # 941 "/usr/include/stdio.h" 3 4
800 extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
801
802
803
804 extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1)));
805
806
807 extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
808 # 959 "/usr/include/stdio.h" 3 4
809 extern int __uflow (FILE *);
810 extern int __overflow (FILE *, int);
811
812
813
814 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio2-decl.h" 1 3 4
815 # 26 "/usr/include/x86_64-linux-gnu/bits/stdio2-decl.h" 3 4
816 extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
817 const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__))
818 __attribute__ ((__access__ (__write_only__, 1, 3)));
819 extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
820 const char *__restrict __format,
821 __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__))
822 __attribute__ ((__access__ (__write_only__, 1, 3)));
823
824
825
826 extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
827 size_t __slen, const char *__restrict __format,
828 ...) __attribute__ ((__nothrow__ , __leaf__))
829 __attribute__ ((__access__ (__write_only__, 1, 2)));
830 extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
831 size_t __slen, const char *__restrict __format,
832 __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__))
833 __attribute__ ((__access__ (__write_only__, 1, 2)));
834
835
836
837
838
839 extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
840 const char *__restrict __format, ...)
841 __attribute__ ((__nonnull__ (1)));
842 extern int __printf_chk (int __flag, const char *__restrict __format, ...);
843 extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
844 const char *__restrict __format,
845 __gnuc_va_list __ap) __attribute__ ((__nonnull__ (1)));
846 extern int __vprintf_chk (int __flag, const char *__restrict __format,
847 __gnuc_va_list __ap);
848
849
850 extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
851 ...) __attribute__ ((__format__ (__printf__, 3, 4)));
852 extern int __vdprintf_chk (int __fd, int __flag,
853 const char *__restrict __fmt, __gnuc_va_list __arg)
854 __attribute__ ((__format__ (__printf__, 3, 0)));
855 # 96 "/usr/include/x86_64-linux-gnu/bits/stdio2-decl.h" 3 4
856 extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets")
857
858
859 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
860 extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk")
861
862
863 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer")))
864 ;
865
866 extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
867 FILE *__restrict __stream)
868 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__nonnull__ (4)));
869
870 extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread")
871
872
873 __attribute__ ((__warn_unused_result__));
874 extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk")
875
876
877
878
879 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer")))
880 ;
881
882 extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
883 size_t __size, size_t __n,
884 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (5)));
885 # 145 "/usr/include/x86_64-linux-gnu/bits/stdio2-decl.h" 3 4
886 extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked")
887
888
889 __attribute__ ((__warn_unused_result__));
890 extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk")
891
892
893
894
895 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer")))
896 ;
897
898 extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
899 size_t __size, size_t __n,
900 FILE *__restrict __stream)
901 __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (5)));
902 # 965 "/usr/include/stdio.h" 2 3 4
903 # 976 "/usr/include/stdio.h" 3 4
904 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 1 3 4
905 # 46 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 3 4
906 extern __inline __attribute__ ((__gnu_inline__)) int
907 getchar (void)
908 {
909 return getc (stdin);
910 }
911
912
913
914
915 extern __inline __attribute__ ((__gnu_inline__)) int
916 fgetc_unlocked (FILE *__fp)
917 {
918 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
919 }
920
921
922
923
924
925 extern __inline __attribute__ ((__gnu_inline__)) int
926 getc_unlocked (FILE *__fp)
927 {
928 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
929 }
930
931
932 extern __inline __attribute__ ((__gnu_inline__)) int
933 getchar_unlocked (void)
934 {
935 return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
936 }
937
938
939
940
941 extern __inline __attribute__ ((__gnu_inline__)) int
942 putchar (int __c)
943 {
944 return putc (__c, stdout);
945 }
946
947
948
949
950 extern __inline __attribute__ ((__gnu_inline__)) int
951 fputc_unlocked (int __c, FILE *__stream)
952 {
953 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
954 }
955
956
957
958
959
960 extern __inline __attribute__ ((__gnu_inline__)) int
961 putc_unlocked (int __c, FILE *__stream)
962 {
963 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
964 }
965
966
967 extern __inline __attribute__ ((__gnu_inline__)) int
968 putchar_unlocked (int __c)
969 {
970 return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
971 }
972 # 127 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 3 4
973 extern __inline __attribute__ ((__gnu_inline__)) int
974 __attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream)
975 {
976 return (((__stream)->_flags & 0x0010) != 0);
977 }
978
979
980 extern __inline __attribute__ ((__gnu_inline__)) int
981 __attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream)
982 {
983 return (((__stream)->_flags & 0x0020) != 0);
984 }
985 # 977 "/usr/include/stdio.h" 2 3 4
986
987
988
989 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 1 3 4
990 # 27 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 3 4
991 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
992 __attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...)
993 {
994 return __builtin___sprintf_chk (__s, 3 - 1,
995 __builtin_dynamic_object_size (__s, 1), __fmt,
996 __builtin_va_arg_pack ());
997 }
998
999
1000
1001
1002
1003
1004 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
1005 __attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap)
1006
1007 {
1008 return __builtin___vsprintf_chk (__s, 3 - 1,
1009 __builtin_dynamic_object_size (__s, 1), __fmt, __ap);
1010 }
1011
1012
1013
1014 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
1015 __attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...)
1016
1017 {
1018 return __builtin___snprintf_chk (__s, __n, 3 - 1,
1019 __builtin_dynamic_object_size (__s, 1), __fmt,
1020 __builtin_va_arg_pack ());
1021 }
1022
1023
1024
1025
1026
1027
1028 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
1029 __attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap)
1030
1031 {
1032 return __builtin___vsnprintf_chk (__s, __n, 3 - 1,
1033 __builtin_dynamic_object_size (__s, 1), __fmt, __ap);
1034 }
1035
1036
1037
1038
1039
1040 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) int
1041 fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
1042 {
1043 return __fprintf_chk (__stream, 3 - 1, __fmt,
1044 __builtin_va_arg_pack ());
1045 }
1046
1047 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
1048 printf (const char *__restrict __fmt, ...)
1049 {
1050 return __printf_chk (3 - 1, __fmt, __builtin_va_arg_pack ());
1051 }
1052
1053
1054
1055
1056
1057
1058
1059 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
1060 vprintf (const char *__restrict __fmt, __gnuc_va_list __ap)
1061 {
1062
1063 return __vfprintf_chk (stdout, 3 - 1, __fmt, __ap);
1064
1065
1066
1067 }
1068
1069 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) int
1070 vfprintf (FILE *__restrict __stream,
1071 const char *__restrict __fmt, __gnuc_va_list __ap)
1072 {
1073 return __vfprintf_chk (__stream, 3 - 1, __fmt, __ap);
1074 }
1075
1076
1077
1078 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
1079 dprintf (int __fd, const char *__restrict __fmt, ...)
1080 {
1081 return __dprintf_chk (__fd, 3 - 1, __fmt,
1082 __builtin_va_arg_pack ());
1083 }
1084
1085
1086
1087
1088
1089 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
1090 vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap)
1091 {
1092 return __vdprintf_chk (__fd, 3 - 1, __fmt, __ap);
1093 }
1094 # 194 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 3 4
1095 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1)))
1096 __attribute__ ((__nonnull__ (3))) char *
1097 fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
1098 {
1099 size_t sz = __builtin_dynamic_object_size (__s, 1);
1100 if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))) && (((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char)))))))
1101 return __fgets_alias (__s, __n, __stream);
1102 if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char)))))
1103 return __fgets_chk_warn (__s, sz, __n, __stream);
1104 return __fgets_chk (__s, sz, __n, __stream);
1105 }
1106
1107 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (4))) size_t
1108 fread (void *__restrict __ptr, size_t __size, size_t __n,
1109 FILE *__restrict __stream)
1110 {
1111 size_t sz = __builtin_dynamic_object_size (__ptr, 0);
1112 if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((__size)))) && (((long unsigned int) (__n)) <= ((sz)) / ((__size))))))
1113 return __fread_alias (__ptr, __size, __n, __stream);
1114 if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && !(((long unsigned int) (__n)) <= (sz) / (__size))))
1115 return __fread_chk_warn (__ptr, sz, __size, __n, __stream);
1116 return __fread_chk (__ptr, sz, __size, __n, __stream);
1117 }
1118 # 234 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 3 4
1119 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (4))) size_t
1120 fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
1121 FILE *__restrict __stream)
1122 {
1123 size_t sz = __builtin_dynamic_object_size (__ptr, 0);
1124 if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((__size)))) && (((long unsigned int) (__n)) <= ((sz)) / ((__size))))))
1125 {
1126
1127 if (__builtin_constant_p (__size)
1128 && __builtin_constant_p (__n)
1129 && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
1130 && __size * __n <= 8)
1131 {
1132 size_t __cnt = __size * __n;
1133 char *__cptr = (char *) __ptr;
1134 if (__cnt == 0)
1135 return 0;
1136
1137 for (; __cnt > 0; --__cnt)
1138 {
1139 int __c = getc_unlocked (__stream);
1140 if (__c == (-1))
1141 break;
1142 *__cptr++ = __c;
1143 }
1144 return (__cptr - (char *) __ptr) / __size;
1145 }
1146
1147 return __fread_unlocked_alias (__ptr, __size, __n, __stream);
1148 }
1149 if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && !(((long unsigned int) (__n)) <= (sz) / (__size))))
1150 return __fread_unlocked_chk_warn (__ptr, sz, __size, __n, __stream);
1151 return __fread_unlocked_chk (__ptr, sz, __size, __n, __stream);
1152
1153 }
1154 # 981 "/usr/include/stdio.h" 2 3 4
1155
1156
1157
1158 # 13 "ssl/ssl_lib.c" 2
1159 # 1 "ssl/ssl_local.h" 1
1160 # 15 "ssl/ssl_local.h"
1161 # 1 "include/internal/e_os.h" 1
1162 # 13 "include/internal/e_os.h"
1163 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 1 3 4
1164 # 34 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 3 4
1165 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/syslimits.h" 1 3 4
1166
1167
1168
1169
1170
1171
1172 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 1 3 4
1173 # 205 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 3 4
1174 # 1 "/usr/include/limits.h" 1 3 4
1175 # 26 "/usr/include/limits.h" 3 4
1176 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4
1177 # 27 "/usr/include/limits.h" 2 3 4
1178 # 195 "/usr/include/limits.h" 3 4
1179 # 1 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 1 3 4
1180 # 27 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 3 4
1181 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
1182 # 28 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4
1183 # 161 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 3 4
1184 # 1 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 1 3 4
1185 # 38 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 3 4
1186 # 1 "/usr/include/linux/limits.h" 1 3 4
1187 # 39 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 2 3 4
1188 # 81 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 3 4
1189 # 1 "/usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h" 1 3 4
1190 # 29 "/usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h" 3 4
1191 # 1 "/usr/include/x86_64-linux-gnu/bits/pthread_stack_min.h" 1 3 4
1192 # 30 "/usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h" 2 3 4
1193 # 82 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 2 3 4
1194 # 162 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4
1195 # 196 "/usr/include/limits.h" 2 3 4
1196
1197
1198
1199 # 1 "/usr/include/x86_64-linux-gnu/bits/posix2_lim.h" 1 3 4
1200 # 200 "/usr/include/limits.h" 2 3 4
1201 # 206 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 2 3 4
1202 # 8 "/usr/lib/gcc/x86_64-linux-gnu/13/include/syslimits.h" 2 3 4
1203 # 35 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 2 3 4
1204 # 14 "include/internal/e_os.h" 2
1205 # 1 "include/openssl/opensslconf.h" 1
1206 # 12 "include/openssl/opensslconf.h"
1207
1208
1209 # 1 "include/openssl/configuration.h" 1
1210 # 16 "include/openssl/configuration.h"
1211
1212 # 15 "include/openssl/opensslconf.h" 2
1213 # 1 "include/openssl/macros.h" 1
1214 # 12 "include/openssl/macros.h"
1215
1216
1217
1218 # 1 "include/openssl/opensslv.h" 1
1219 # 15 "include/openssl/opensslv.h"
1220
1221 # 16 "include/openssl/macros.h" 2
1222 # 16 "include/openssl/opensslconf.h" 2
1223 # 15 "include/internal/e_os.h" 2
1224
1225 # 1 "include/openssl/e_os2.h" 1
1226 # 12 "include/openssl/e_os2.h"
1227
1228 # 234 "include/openssl/e_os2.h"
1229 # 1 "/usr/include/inttypes.h" 1 3 4
1230 # 27 "/usr/include/inttypes.h" 3 4
1231 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdint.h" 1 3 4
1232 # 9 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdint.h" 3 4
1233 # 1 "/usr/include/stdint.h" 1 3 4
1234 # 26 "/usr/include/stdint.h" 3 4
1235 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4
1236 # 27 "/usr/include/stdint.h" 2 3 4
1237
1238 # 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4
1239 # 29 "/usr/include/stdint.h" 2 3 4
1240 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
1241 # 30 "/usr/include/stdint.h" 2 3 4
1242
1243
1244
1245
1246 # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 1 3 4
1247 # 24 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 3 4
1248 typedef __int8_t int8_t;
1249 typedef __int16_t int16_t;
1250 typedef __int32_t int32_t;
1251 typedef __int64_t int64_t;
1252 # 35 "/usr/include/stdint.h" 2 3 4
1253
1254
1255 # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 1 3 4
1256 # 24 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 3 4
1257 typedef __uint8_t uint8_t;
1258 typedef __uint16_t uint16_t;
1259 typedef __uint32_t uint32_t;
1260 typedef __uint64_t uint64_t;
1261 # 38 "/usr/include/stdint.h" 2 3 4
1262
1263
1264
1265 # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-least.h" 1 3 4
1266 # 25 "/usr/include/x86_64-linux-gnu/bits/stdint-least.h" 3 4
1267 typedef __int_least8_t int_least8_t;
1268 typedef __int_least16_t int_least16_t;
1269 typedef __int_least32_t int_least32_t;
1270 typedef __int_least64_t int_least64_t;
1271
1272
1273 typedef __uint_least8_t uint_least8_t;
1274 typedef __uint_least16_t uint_least16_t;
1275 typedef __uint_least32_t uint_least32_t;
1276 typedef __uint_least64_t uint_least64_t;
1277 # 42 "/usr/include/stdint.h" 2 3 4
1278
1279
1280
1281
1282
1283 typedef signed char int_fast8_t;
1284
1285 typedef long int int_fast16_t;
1286 typedef long int int_fast32_t;
1287 typedef long int int_fast64_t;
1288 # 60 "/usr/include/stdint.h" 3 4
1289 typedef unsigned char uint_fast8_t;
1290
1291 typedef unsigned long int uint_fast16_t;
1292 typedef unsigned long int uint_fast32_t;
1293 typedef unsigned long int uint_fast64_t;
1294 # 76 "/usr/include/stdint.h" 3 4
1295 typedef long int intptr_t;
1296
1297
1298 typedef unsigned long int uintptr_t;
1299 # 90 "/usr/include/stdint.h" 3 4
1300 typedef __intmax_t intmax_t;
1301 typedef __uintmax_t uintmax_t;
1302 # 10 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdint.h" 2 3 4
1303 # 28 "/usr/include/inttypes.h" 2 3 4
1304
1305
1306
1307
1308
1309
1310 typedef int __gwchar_t;
1311 # 327 "/usr/include/inttypes.h" 3 4
1312
1313
1314
1315
1316
1317 typedef struct
1318 {
1319 long int quot;
1320 long int rem;
1321 } imaxdiv_t;
1322 # 351 "/usr/include/inttypes.h" 3 4
1323 extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1324
1325
1326 extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
1327 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1328
1329
1330 extern intmax_t strtoimax (const char *__restrict __nptr,
1331 char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__));
1332
1333
1334 extern uintmax_t strtoumax (const char *__restrict __nptr,
1335 char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__));
1336
1337
1338 extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
1339 __gwchar_t **__restrict __endptr, int __base)
1340 __attribute__ ((__nothrow__ , __leaf__));
1341
1342
1343 extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
1344 __gwchar_t ** __restrict __endptr, int __base)
1345 __attribute__ ((__nothrow__ , __leaf__));
1346 # 415 "/usr/include/inttypes.h" 3 4
1347
1348 # 235 "include/openssl/e_os2.h" 2
1349 # 260 "include/openssl/e_os2.h"
1350
1351 # 260 "include/openssl/e_os2.h"
1352 typedef intmax_t ossl_intmax_t;
1353 typedef uintmax_t ossl_uintmax_t;
1354 # 17 "include/internal/e_os.h" 2
1355 # 1 "include/openssl/crypto.h" 1
1356 # 18 "include/openssl/crypto.h"
1357
1358
1359
1360
1361
1362
1363
1364 # 1 "/usr/include/stdlib.h" 1 3 4
1365 # 26 "/usr/include/stdlib.h" 3 4
1366 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4
1367 # 27 "/usr/include/stdlib.h" 2 3 4
1368
1369
1370
1371
1372
1373 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
1374 # 329 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 3 4
1375
1376 # 329 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 3 4
1377 typedef int wchar_t;
1378 # 33 "/usr/include/stdlib.h" 2 3 4
1379
1380
1381
1382
1383
1384
1385
1386 # 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4
1387 # 41 "/usr/include/stdlib.h" 2 3 4
1388 # 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4
1389 # 42 "/usr/include/stdlib.h" 2 3 4
1390 # 59 "/usr/include/stdlib.h" 3 4
1391 typedef struct
1392 {
1393 int quot;
1394 int rem;
1395 } div_t;
1396
1397
1398
1399 typedef struct
1400 {
1401 long int quot;
1402 long int rem;
1403 } ldiv_t;
1404
1405
1406
1407
1408
1409 __extension__ typedef struct
1410 {
1411 long long int quot;
1412 long long int rem;
1413 } lldiv_t;
1414 # 98 "/usr/include/stdlib.h" 3 4
1415 extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1416
1417
1418
1419 extern double atof (const char *__nptr)
1420 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1421
1422 extern int atoi (const char *__nptr)
1423 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1424
1425 extern long int atol (const char *__nptr)
1426 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1427
1428
1429
1430 __extension__ extern long long int atoll (const char *__nptr)
1431 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1432
1433
1434
1435 extern double strtod (const char *__restrict __nptr,
1436 char **__restrict __endptr)
1437 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1438
1439
1440
1441 extern float strtof (const char *__restrict __nptr,
1442 char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1443
1444 extern long double strtold (const char *__restrict __nptr,
1445 char **__restrict __endptr)
1446 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1447 # 177 "/usr/include/stdlib.h" 3 4
1448 extern long int strtol (const char *__restrict __nptr,
1449 char **__restrict __endptr, int __base)
1450 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1451
1452 extern unsigned long int strtoul (const char *__restrict __nptr,
1453 char **__restrict __endptr, int __base)
1454 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1455
1456
1457
1458 __extension__
1459 extern long long int strtoq (const char *__restrict __nptr,
1460 char **__restrict __endptr, int __base)
1461 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1462
1463 __extension__
1464 extern unsigned long long int strtouq (const char *__restrict __nptr,
1465 char **__restrict __endptr, int __base)
1466 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1467
1468
1469
1470
1471 __extension__
1472 extern long long int strtoll (const char *__restrict __nptr,
1473 char **__restrict __endptr, int __base)
1474 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1475
1476 __extension__
1477 extern unsigned long long int strtoull (const char *__restrict __nptr,
1478 char **__restrict __endptr, int __base)
1479 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1480 # 480 "/usr/include/stdlib.h" 3 4
1481 extern __inline __attribute__ ((__gnu_inline__)) int
1482 __attribute__ ((__nothrow__ , __leaf__)) atoi (const char *__nptr)
1483 {
1484 return (int) strtol (__nptr, (char **) ((void *)0), 10);
1485 }
1486 extern __inline __attribute__ ((__gnu_inline__)) long int
1487 __attribute__ ((__nothrow__ , __leaf__)) atol (const char *__nptr)
1488 {
1489 return strtol (__nptr, (char **) ((void *)0), 10);
1490 }
1491
1492
1493 __extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int
1494 __attribute__ ((__nothrow__ , __leaf__)) atoll (const char *__nptr)
1495 {
1496 return strtoll (__nptr, (char **) ((void *)0), 10);
1497 }
1498 # 505 "/usr/include/stdlib.h" 3 4
1499 extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1500
1501
1502 extern long int a64l (const char *__s)
1503 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1504
1505
1506
1507
1508 # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4
1509 # 27 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
1510
1511
1512
1513
1514
1515
1516 typedef __u_char u_char;
1517 typedef __u_short u_short;
1518 typedef __u_int u_int;
1519 typedef __u_long u_long;
1520 typedef __quad_t quad_t;
1521 typedef __u_quad_t u_quad_t;
1522 typedef __fsid_t fsid_t;
1523
1524
1525 typedef __loff_t loff_t;
1526
1527
1528
1529
1530 typedef __ino_t ino_t;
1531 # 59 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
1532 typedef __dev_t dev_t;
1533
1534
1535
1536
1537 typedef __gid_t gid_t;
1538
1539
1540
1541
1542 typedef __mode_t mode_t;
1543
1544
1545
1546
1547 typedef __nlink_t nlink_t;
1548
1549
1550
1551
1552 typedef __uid_t uid_t;
1553 # 97 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
1554 typedef __pid_t pid_t;
1555
1556
1557
1558
1559
1560 typedef __id_t id_t;
1561 # 114 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
1562 typedef __daddr_t daddr_t;
1563 typedef __caddr_t caddr_t;
1564
1565
1566
1567
1568
1569 typedef __key_t key_t;
1570
1571
1572
1573
1574 # 1 "/usr/include/x86_64-linux-gnu/bits/types/clock_t.h" 1 3 4
1575
1576
1577
1578
1579
1580
1581 typedef __clock_t clock_t;
1582 # 127 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1583
1584 # 1 "/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h" 1 3 4
1585
1586
1587
1588
1589
1590
1591 typedef __clockid_t clockid_t;
1592 # 129 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1593 # 1 "/usr/include/x86_64-linux-gnu/bits/types/time_t.h" 1 3 4
1594 # 10 "/usr/include/x86_64-linux-gnu/bits/types/time_t.h" 3 4
1595 typedef __time_t time_t;
1596 # 130 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1597 # 1 "/usr/include/x86_64-linux-gnu/bits/types/timer_t.h" 1 3 4
1598
1599
1600
1601
1602
1603
1604 typedef __timer_t timer_t;
1605 # 131 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1606 # 144 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
1607 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
1608 # 145 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1609
1610
1611
1612 typedef unsigned long int ulong;
1613 typedef unsigned short int ushort;
1614 typedef unsigned int uint;
1615
1616
1617
1618
1619
1620
1621
1622 typedef __uint8_t u_int8_t;
1623 typedef __uint16_t u_int16_t;
1624 typedef __uint32_t u_int32_t;
1625 typedef __uint64_t u_int64_t;
1626
1627
1628 typedef int register_t __attribute__ ((__mode__ (__word__)));
1629 # 176 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
1630 # 1 "/usr/include/endian.h" 1 3 4
1631 # 24 "/usr/include/endian.h" 3 4
1632 # 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4
1633 # 35 "/usr/include/x86_64-linux-gnu/bits/endian.h" 3 4
1634 # 1 "/usr/include/x86_64-linux-gnu/bits/endianness.h" 1 3 4
1635 # 36 "/usr/include/x86_64-linux-gnu/bits/endian.h" 2 3 4
1636 # 25 "/usr/include/endian.h" 2 3 4
1637 # 35 "/usr/include/endian.h" 3 4
1638 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4
1639 # 33 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4
1640 static __inline __uint16_t
1641 __bswap_16 (__uint16_t __bsx)
1642 {
1643
1644 return __builtin_bswap16 (__bsx);
1645
1646
1647
1648 }
1649
1650
1651
1652
1653
1654
1655 static __inline __uint32_t
1656 __bswap_32 (__uint32_t __bsx)
1657 {
1658
1659 return __builtin_bswap32 (__bsx);
1660
1661
1662
1663 }
1664 # 69 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4
1665 __extension__ static __inline __uint64_t
1666 __bswap_64 (__uint64_t __bsx)
1667 {
1668
1669 return __builtin_bswap64 (__bsx);
1670
1671
1672
1673 }
1674 # 36 "/usr/include/endian.h" 2 3 4
1675 # 1 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 1 3 4
1676 # 32 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 3 4
1677 static __inline __uint16_t
1678 __uint16_identity (__uint16_t __x)
1679 {
1680 return __x;
1681 }
1682
1683 static __inline __uint32_t
1684 __uint32_identity (__uint32_t __x)
1685 {
1686 return __x;
1687 }
1688
1689 static __inline __uint64_t
1690 __uint64_identity (__uint64_t __x)
1691 {
1692 return __x;
1693 }
1694 # 37 "/usr/include/endian.h" 2 3 4
1695 # 177 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1696
1697
1698 # 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4
1699 # 30 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
1700 # 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4
1701 # 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
1702
1703
1704 # 1 "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h" 1 3 4
1705
1706
1707
1708 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h" 1 3 4
1709
1710
1711
1712
1713 typedef struct
1714 {
1715 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
1716 } __sigset_t;
1717 # 5 "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h" 2 3 4
1718
1719
1720 typedef __sigset_t sigset_t;
1721 # 34 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
1722
1723
1724
1725 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h" 1 3 4
1726
1727
1728
1729
1730
1731
1732
1733 struct timeval
1734 {
1735
1736
1737
1738
1739 __time_t tv_sec;
1740 __suseconds_t tv_usec;
1741
1742 };
1743 # 38 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
1744
1745 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 1 3 4
1746 # 11 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4
1747 struct timespec
1748 {
1749
1750
1751
1752 __time_t tv_sec;
1753
1754
1755
1756
1757 __syscall_slong_t tv_nsec;
1758 # 31 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4
1759 };
1760 # 40 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
1761
1762
1763
1764 typedef __suseconds_t suseconds_t;
1765
1766
1767
1768
1769
1770 typedef long int __fd_mask;
1771 # 59 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
1772 typedef struct
1773 {
1774
1775
1776
1777
1778
1779
1780 __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
1781
1782
1783 } fd_set;
1784
1785
1786
1787
1788
1789
1790 typedef __fd_mask fd_mask;
1791 # 91 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
1792
1793 # 102 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
1794 extern int select (int __nfds, fd_set *__restrict __readfds,
1795 fd_set *__restrict __writefds,
1796 fd_set *__restrict __exceptfds,
1797 struct timeval *__restrict __timeout);
1798 # 127 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
1799 extern int pselect (int __nfds, fd_set *__restrict __readfds,
1800 fd_set *__restrict __writefds,
1801 fd_set *__restrict __exceptfds,
1802 const struct timespec *__restrict __timeout,
1803 const __sigset_t *__restrict __sigmask);
1804 # 150 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
1805 # 1 "/usr/include/x86_64-linux-gnu/bits/select2.h" 1 3 4
1806 # 23 "/usr/include/x86_64-linux-gnu/bits/select2.h" 3 4
1807 # 1 "/usr/include/x86_64-linux-gnu/bits/select-decl.h" 1 3 4
1808 # 27 "/usr/include/x86_64-linux-gnu/bits/select-decl.h" 3 4
1809 extern long int __fdelt_chk (long int __d);
1810 extern long int __fdelt_warn (long int __d)
1811 __attribute__((__warning__ ("bit outside of fd_set selected")));
1812 # 24 "/usr/include/x86_64-linux-gnu/bits/select2.h" 2 3 4
1813 # 151 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
1814
1815
1816
1817 # 180 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1818
1819
1820
1821
1822
1823 typedef __blksize_t blksize_t;
1824
1825
1826
1827
1828
1829
1830 typedef __blkcnt_t blkcnt_t;
1831
1832
1833
1834 typedef __fsblkcnt_t fsblkcnt_t;
1835
1836
1837
1838 typedef __fsfilcnt_t fsfilcnt_t;
1839 # 227 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
1840 # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4
1841 # 23 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4
1842 # 1 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 1 3 4
1843 # 44 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4
1844 # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 1 3 4
1845 # 21 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4
1846 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
1847 # 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 2 3 4
1848 # 45 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4
1849
1850 # 1 "/usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h" 1 3 4
1851 # 25 "/usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h" 3 4
1852 typedef union
1853 {
1854 __extension__ unsigned long long int __value64;
1855 struct
1856 {
1857 unsigned int __low;
1858 unsigned int __high;
1859 } __value32;
1860 } __atomic_wide_counter;
1861 # 47 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4
1862
1863
1864
1865
1866 typedef struct __pthread_internal_list
1867 {
1868 struct __pthread_internal_list *__prev;
1869 struct __pthread_internal_list *__next;
1870 } __pthread_list_t;
1871
1872 typedef struct __pthread_internal_slist
1873 {
1874 struct __pthread_internal_slist *__next;
1875 } __pthread_slist_t;
1876 # 76 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4
1877 # 1 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 1 3 4
1878 # 22 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 3 4
1879 struct __pthread_mutex_s
1880 {
1881 int __lock;
1882 unsigned int __count;
1883 int __owner;
1884
1885 unsigned int __nusers;
1886
1887
1888
1889 int __kind;
1890
1891 short __spins;
1892 short __elision;
1893 __pthread_list_t __list;
1894 # 53 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 3 4
1895 };
1896 # 77 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4
1897 # 89 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4
1898 # 1 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 1 3 4
1899 # 23 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 3 4
1900 struct __pthread_rwlock_arch_t
1901 {
1902 unsigned int __readers;
1903 unsigned int __writers;
1904 unsigned int __wrphase_futex;
1905 unsigned int __writers_futex;
1906 unsigned int __pad3;
1907 unsigned int __pad4;
1908
1909 int __cur_writer;
1910 int __shared;
1911 signed char __rwelision;
1912
1913
1914
1915
1916 unsigned char __pad1[7];
1917
1918
1919 unsigned long int __pad2;
1920
1921
1922 unsigned int __flags;
1923 # 55 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 3 4
1924 };
1925 # 90 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4
1926
1927
1928
1929
1930 struct __pthread_cond_s
1931 {
1932 __atomic_wide_counter __wseq;
1933 __atomic_wide_counter __g1_start;
1934 unsigned int __g_refs[2] ;
1935 unsigned int __g_size[2];
1936 unsigned int __g1_orig_size;
1937 unsigned int __wrefs;
1938 unsigned int __g_signals[2];
1939 };
1940
1941 typedef unsigned int __tss_t;
1942 typedef unsigned long int __thrd_t;
1943
1944 typedef struct
1945 {
1946 int __data ;
1947 } __once_flag;
1948 # 24 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4
1949
1950
1951
1952 typedef unsigned long int pthread_t;
1953
1954
1955
1956
1957 typedef union
1958 {
1959 char __size[4];
1960 int __align;
1961 } pthread_mutexattr_t;
1962
1963
1964
1965
1966 typedef union
1967 {
1968 char __size[4];
1969 int __align;
1970 } pthread_condattr_t;
1971
1972
1973
1974 typedef unsigned int pthread_key_t;
1975
1976
1977
1978 typedef int pthread_once_t;
1979
1980
1981 union pthread_attr_t
1982 {
1983 char __size[56];
1984 long int __align;
1985 };
1986
1987 typedef union pthread_attr_t pthread_attr_t;
1988
1989
1990
1991
1992 typedef union
1993 {
1994 struct __pthread_mutex_s __data;
1995 char __size[40];
1996 long int __align;
1997 } pthread_mutex_t;
1998
1999
2000 typedef union
2001 {
2002 struct __pthread_cond_s __data;
2003 char __size[48];
2004 __extension__ long long int __align;
2005 } pthread_cond_t;
2006
2007
2008
2009
2010
2011 typedef union
2012 {
2013 struct __pthread_rwlock_arch_t __data;
2014 char __size[56];
2015 long int __align;
2016 } pthread_rwlock_t;
2017
2018 typedef union
2019 {
2020 char __size[8];
2021 long int __align;
2022 } pthread_rwlockattr_t;
2023
2024
2025
2026
2027
2028 typedef volatile int pthread_spinlock_t;
2029
2030
2031
2032
2033 typedef union
2034 {
2035 char __size[32];
2036 long int __align;
2037 } pthread_barrier_t;
2038
2039 typedef union
2040 {
2041 char __size[4];
2042 int __align;
2043 } pthread_barrierattr_t;
2044 # 228 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
2045
2046
2047
2048 # 515 "/usr/include/stdlib.h" 2 3 4
2049
2050
2051
2052
2053
2054
2055 extern long int random (void) __attribute__ ((__nothrow__ , __leaf__));
2056
2057
2058 extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
2059
2060
2061
2062
2063
2064 extern char *initstate (unsigned int __seed, char *__statebuf,
2065 size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2066
2067
2068
2069 extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2070
2071
2072
2073
2074
2075
2076
2077 struct random_data
2078 {
2079 int32_t *fptr;
2080 int32_t *rptr;
2081 int32_t *state;
2082 int rand_type;
2083 int rand_deg;
2084 int rand_sep;
2085 int32_t *end_ptr;
2086 };
2087
2088 extern int random_r (struct random_data *__restrict __buf,
2089 int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2090
2091 extern int srandom_r (unsigned int __seed, struct random_data *__buf)
2092 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2093
2094 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
2095 size_t __statelen,
2096 struct random_data *__restrict __buf)
2097 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
2098
2099 extern int setstate_r (char *__restrict __statebuf,
2100 struct random_data *__restrict __buf)
2101 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2102
2103
2104
2105
2106
2107 extern int rand (void) __attribute__ ((__nothrow__ , __leaf__));
2108
2109 extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
2110
2111
2112
2113 extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__));
2114
2115
2116
2117
2118
2119
2120
2121 extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__));
2122 extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2123
2124
2125 extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
2126 extern long int nrand48 (unsigned short int __xsubi[3])
2127 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2128
2129
2130 extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
2131 extern long int jrand48 (unsigned short int __xsubi[3])
2132 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2133
2134
2135 extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__));
2136 extern unsigned short int *seed48 (unsigned short int __seed16v[3])
2137 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2138 extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2139
2140
2141
2142
2143
2144 struct drand48_data
2145 {
2146 unsigned short int __x[3];
2147 unsigned short int __old_x[3];
2148 unsigned short int __c;
2149 unsigned short int __init;
2150 __extension__ unsigned long long int __a;
2151
2152 };
2153
2154
2155 extern int drand48_r (struct drand48_data *__restrict __buffer,
2156 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2157 extern int erand48_r (unsigned short int __xsubi[3],
2158 struct drand48_data *__restrict __buffer,
2159 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2160
2161
2162 extern int lrand48_r (struct drand48_data *__restrict __buffer,
2163 long int *__restrict __result)
2164 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2165 extern int nrand48_r (unsigned short int __xsubi[3],
2166 struct drand48_data *__restrict __buffer,
2167 long int *__restrict __result)
2168 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2169
2170
2171 extern int mrand48_r (struct drand48_data *__restrict __buffer,
2172 long int *__restrict __result)
2173 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2174 extern int jrand48_r (unsigned short int __xsubi[3],
2175 struct drand48_data *__restrict __buffer,
2176 long int *__restrict __result)
2177 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2178
2179
2180 extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
2181 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2182
2183 extern int seed48_r (unsigned short int __seed16v[3],
2184 struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2185
2186 extern int lcong48_r (unsigned short int __param[7],
2187 struct drand48_data *__buffer)
2188 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2189
2190
2191 extern __uint32_t arc4random (void)
2192 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2193
2194
2195 extern void arc4random_buf (void *__buf, size_t __size)
2196 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2197
2198
2199
2200 extern __uint32_t arc4random_uniform (__uint32_t __upper_bound)
2201 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2202
2203
2204
2205
2206 extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__))
2207 __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__));
2208
2209 extern void *calloc (size_t __nmemb, size_t __size)
2210 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1, 2))) __attribute__ ((__warn_unused_result__));
2211
2212
2213
2214
2215
2216
2217 extern void *realloc (void *__ptr, size_t __size)
2218 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2)));
2219
2220
2221 extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
2222
2223
2224
2225
2226
2227
2228
2229 extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
2230 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
2231 __attribute__ ((__alloc_size__ (2, 3)))
2232 __attribute__ ((__malloc__ (__builtin_free, 1)));
2233
2234
2235 extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
2236 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__ (reallocarray, 1)));
2237
2238
2239
2240 # 1 "/usr/include/alloca.h" 1 3 4
2241 # 24 "/usr/include/alloca.h" 3 4
2242 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
2243 # 25 "/usr/include/alloca.h" 2 3 4
2244
2245
2246
2247
2248
2249
2250
2251 extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
2252
2253
2254
2255
2256
2257
2258 # 707 "/usr/include/stdlib.h" 2 3 4
2259
2260
2261
2262
2263
2264 extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__))
2265 __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__));
2266
2267
2268
2269
2270 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
2271 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2272
2273
2274
2275
2276 extern void *aligned_alloc (size_t __alignment, size_t __size)
2277 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_align__ (1)))
2278 __attribute__ ((__alloc_size__ (2))) __attribute__ ((__warn_unused_result__));
2279
2280
2281
2282 extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
2283
2284
2285
2286 extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2287
2288
2289
2290
2291
2292
2293
2294 extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2295
2296
2297
2298
2299
2300
2301 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
2302 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2303
2304
2305
2306
2307
2308 extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
2309
2310
2311
2312
2313
2314 extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
2315
2316
2317
2318
2319
2320 extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
2321
2322
2323
2324
2325 extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2326 # 786 "/usr/include/stdlib.h" 3 4
2327 extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2328
2329
2330
2331
2332
2333 extern int setenv (const char *__name, const char *__value, int __replace)
2334 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2335
2336
2337 extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2338
2339
2340
2341
2342
2343
2344 extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__));
2345 # 814 "/usr/include/stdlib.h" 3 4
2346 extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2347 # 827 "/usr/include/stdlib.h" 3 4
2348 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2349 # 849 "/usr/include/stdlib.h" 3 4
2350 extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2351 # 870 "/usr/include/stdlib.h" 3 4
2352 extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2353 # 923 "/usr/include/stdlib.h" 3 4
2354 extern int system (const char *__command) __attribute__ ((__warn_unused_result__));
2355 # 940 "/usr/include/stdlib.h" 3 4
2356 extern char *realpath (const char *__restrict __name,
2357 char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2358
2359
2360
2361
2362
2363
2364 typedef int (*__compar_fn_t) (const void *, const void *);
2365 # 960 "/usr/include/stdlib.h" 3 4
2366 extern void *bsearch (const void *__key, const void *__base,
2367 size_t __nmemb, size_t __size, __compar_fn_t __compar)
2368 __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__));
2369
2370
2371 # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h" 1 3 4
2372 # 19 "/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h" 3 4
2373 extern __inline __attribute__ ((__gnu_inline__)) void *
2374 bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
2375 __compar_fn_t __compar)
2376 {
2377 size_t __l, __u, __idx;
2378 const void *__p;
2379 int __comparison;
2380
2381 __l = 0;
2382 __u = __nmemb;
2383 while (__l < __u)
2384 {
2385 __idx = (__l + __u) / 2;
2386 __p = (const void *) (((const char *) __base) + (__idx * __size));
2387 __comparison = (*__compar) (__key, __p);
2388 if (__comparison < 0)
2389 __u = __idx;
2390 else if (__comparison > 0)
2391 __l = __idx + 1;
2392 else
2393 {
2394
2395 #pragma GCC diagnostic push
2396 #pragma GCC diagnostic ignored "-Wcast-qual"
2397
2398 return (void *) __p;
2399
2400 #pragma GCC diagnostic pop
2401
2402 }
2403 }
2404
2405 return ((void *)0);
2406 }
2407 # 966 "/usr/include/stdlib.h" 2 3 4
2408
2409
2410
2411
2412 extern void qsort (void *__base, size_t __nmemb, size_t __size,
2413 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
2414 # 980 "/usr/include/stdlib.h" 3 4
2415 extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2416 extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2417
2418
2419 __extension__ extern long long int llabs (long long int __x)
2420 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2421
2422
2423
2424
2425
2426
2427 extern div_t div (int __numer, int __denom)
2428 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2429 extern ldiv_t ldiv (long int __numer, long int __denom)
2430 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2431
2432
2433 __extension__ extern lldiv_t lldiv (long long int __numer,
2434 long long int __denom)
2435 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2436 # 1012 "/usr/include/stdlib.h" 3 4
2437 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
2438 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
2439
2440
2441
2442
2443 extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
2444 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
2445
2446
2447
2448
2449 extern char *gcvt (double __value, int __ndigit, char *__buf)
2450 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
2451
2452
2453
2454
2455 extern char *qecvt (long double __value, int __ndigit,
2456 int *__restrict __decpt, int *__restrict __sign)
2457 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
2458 extern char *qfcvt (long double __value, int __ndigit,
2459 int *__restrict __decpt, int *__restrict __sign)
2460 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
2461 extern char *qgcvt (long double __value, int __ndigit, char *__buf)
2462 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
2463
2464
2465
2466
2467 extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
2468 int *__restrict __sign, char *__restrict __buf,
2469 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2470 extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
2471 int *__restrict __sign, char *__restrict __buf,
2472 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2473
2474 extern int qecvt_r (long double __value, int __ndigit,
2475 int *__restrict __decpt, int *__restrict __sign,
2476 char *__restrict __buf, size_t __len)
2477 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2478 extern int qfcvt_r (long double __value, int __ndigit,
2479 int *__restrict __decpt, int *__restrict __sign,
2480 char *__restrict __buf, size_t __len)
2481 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2482
2483
2484
2485
2486
2487 extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
2488
2489
2490 extern int mbtowc (wchar_t *__restrict __pwc,
2491 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
2492
2493
2494 extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__));
2495
2496
2497
2498 extern size_t mbstowcs (wchar_t *__restrict __pwcs,
2499 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__))
2500 __attribute__ ((__access__ (__read_only__, 2)));
2501
2502 extern size_t wcstombs (char *__restrict __s,
2503 const wchar_t *__restrict __pwcs, size_t __n)
2504 __attribute__ ((__nothrow__ , __leaf__))
2505 __attribute__ ((__access__ (__write_only__, 1)))
2506 __attribute__ ((__access__ (__read_only__, 2)));
2507
2508
2509
2510
2511
2512
2513 extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2514 # 1099 "/usr/include/stdlib.h" 3 4
2515 extern int getsubopt (char **__restrict __optionp,
2516 char *const *__restrict __tokens,
2517 char **__restrict __valuep)
2518 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__));
2519 # 1145 "/usr/include/stdlib.h" 3 4
2520 extern int getloadavg (double __loadavg[], int __nelem)
2521 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2522 # 1155 "/usr/include/stdlib.h" 3 4
2523 # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 1 3 4
2524 # 24 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 3 4
2525 extern __inline __attribute__ ((__gnu_inline__)) double
2526 __attribute__ ((__nothrow__ , __leaf__)) atof (const char *__nptr)
2527 {
2528 return strtod (__nptr, (char **) ((void *)0));
2529 }
2530 # 1156 "/usr/include/stdlib.h" 2 3 4
2531
2532
2533
2534 # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib.h" 1 3 4
2535 # 23 "/usr/include/x86_64-linux-gnu/bits/stdlib.h" 3 4
2536 extern char *__realpath_chk (const char *__restrict __name,
2537 char *__restrict __resolved,
2538 size_t __resolvedlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2539 extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ , __leaf__))
2540
2541 __attribute__ ((__warn_unused_result__));
2542 extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ , __leaf__))
2543
2544
2545 __attribute__ ((__warn_unused_result__))
2546 __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer")))
2547 ;
2548
2549 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
2550 __attribute__ ((__nothrow__ , __leaf__)) realpath (const char *__restrict __name, char *__restrict __resolved)
2551 {
2552 size_t sz = __builtin_dynamic_object_size (__resolved, 1);
2553
2554 if (sz == (size_t) -1)
2555 return __realpath_alias (__name, __resolved);
2556
2557
2558 if ((((__typeof (4096)) 0 < (__typeof (4096)) -1 || (__builtin_constant_p (4096) && (4096) > 0)) && __builtin_constant_p ((((long unsigned int) (4096)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (4096)) <= (sz) / (sizeof (char)))))
2559 return __realpath_chk_warn (__name, __resolved, sz);
2560
2561 return __realpath_chk (__name, __resolved, sz);
2562 }
2563
2564
2565 extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,
2566 size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)))
2567 __attribute__ ((__access__ (__write_only__, 2, 3)));
2568 extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ , __leaf__))
2569
2570 __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3)));
2571 extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
2572
2573
2574 __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf")))
2575 ;
2576
2577 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2578 __attribute__ ((__nothrow__ , __leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen)
2579 {
2580 return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __ptsname_r_alias (__fd, __buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_dynamic_object_size (__buf, 1)) : __ptsname_r_chk (__fd, __buf, __buflen, __builtin_dynamic_object_size (__buf, 1))))
2581
2582 ;
2583 }
2584
2585
2586 extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
2587 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2588 extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ , __leaf__))
2589 __attribute__ ((__warn_unused_result__));
2590
2591 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int
2592 __attribute__ ((__nothrow__ , __leaf__)) wctomb (char *__s, wchar_t __wchar)
2593 {
2594
2595
2596
2597
2598
2599
2600
2601 if (__builtin_dynamic_object_size (__s, 1) != (size_t) -1
2602 && 16 > __builtin_dynamic_object_size (__s, 1))
2603 return __wctomb_chk (__s, __wchar, __builtin_dynamic_object_size (__s, 1));
2604 return __wctomb_alias (__s, __wchar);
2605 }
2606
2607
2608 extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
2609 const char *__restrict __src,
2610 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__))
2611 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
2612 extern size_t __mbstowcs_nulldst (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__))
2613
2614
2615
2616 __attribute__ ((__access__ (__read_only__, 2)));
2617 extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__))
2618
2619
2620
2621 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
2622 extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ , __leaf__))
2623
2624
2625
2626 __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)")))
2627 ;
2628
2629 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
2630 __attribute__ ((__nothrow__ , __leaf__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len)
2631
2632 {
2633 if (__builtin_constant_p (__dst == ((void *)0)) && __dst == ((void *)0))
2634 return __mbstowcs_nulldst (__dst, __src, __len);
2635 else
2636 return (((__builtin_constant_p (__builtin_dynamic_object_size (__dst, 1)) && (__builtin_dynamic_object_size (__dst, 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__dst, 1))) / ((sizeof (wchar_t))))) && (((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__dst, 1))) / ((sizeof (wchar_t)))))) ? __mbstowcs_alias (__dst, __src, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__dst, 1)) / (sizeof (wchar_t)))) && !(((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__dst, 1)) / (sizeof (wchar_t)))) ? __mbstowcs_chk_warn (__dst, __src, __len, (__builtin_dynamic_object_size (__dst, 1)) / (sizeof (wchar_t))) : __mbstowcs_chk (__dst, __src, __len, (__builtin_dynamic_object_size (__dst, 1)) / (sizeof (wchar_t)))))
2637 ;
2638 }
2639
2640 extern size_t __wcstombs_chk (char *__restrict __dst,
2641 const wchar_t *__restrict __src,
2642 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__))
2643 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
2644 extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ , __leaf__))
2645
2646
2647
2648 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
2649 extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ , __leaf__))
2650
2651
2652
2653 __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len")));
2654
2655 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
2656 __attribute__ ((__nothrow__ , __leaf__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len)
2657
2658 {
2659 return (((__builtin_constant_p (__builtin_dynamic_object_size (__dst, 1)) && (__builtin_dynamic_object_size (__dst, 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__dst, 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__dst, 1))) / ((sizeof (char)))))) ? __wcstombs_alias (__dst, __src, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__dst, 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__dst, 1)) / (sizeof (char)))) ? __wcstombs_chk_warn (__dst, __src, __len, __builtin_dynamic_object_size (__dst, 1)) : __wcstombs_chk (__dst, __src, __len, __builtin_dynamic_object_size (__dst, 1))))
2660
2661 ;
2662 }
2663 # 1160 "/usr/include/stdlib.h" 2 3 4
2664
2665
2666
2667
2668
2669
2670
2671
2672 # 26 "include/openssl/crypto.h" 2
2673 # 1 "/usr/include/time.h" 1 3 4
2674 # 29 "/usr/include/time.h" 3 4
2675 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
2676 # 30 "/usr/include/time.h" 2 3 4
2677
2678
2679
2680 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4
2681 # 34 "/usr/include/time.h" 2 3 4
2682
2683
2684
2685
2686
2687 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h" 1 3 4
2688
2689
2690
2691
2692
2693
2694 struct tm
2695 {
2696 int tm_sec;
2697 int tm_min;
2698 int tm_hour;
2699 int tm_mday;
2700 int tm_mon;
2701 int tm_year;
2702 int tm_wday;
2703 int tm_yday;
2704 int tm_isdst;
2705
2706
2707 long int tm_gmtoff;
2708 const char *tm_zone;
2709
2710
2711
2712
2713 };
2714 # 40 "/usr/include/time.h" 2 3 4
2715 # 48 "/usr/include/time.h" 3 4
2716 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h" 1 3 4
2717
2718
2719
2720
2721
2722
2723
2724 struct itimerspec
2725 {
2726 struct timespec it_interval;
2727 struct timespec it_value;
2728 };
2729 # 49 "/usr/include/time.h" 2 3 4
2730 struct sigevent;
2731 # 60 "/usr/include/time.h" 3 4
2732 # 1 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 1 3 4
2733 # 22 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 3 4
2734 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h" 1 3 4
2735 # 27 "/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h" 3 4
2736 struct __locale_struct
2737 {
2738
2739 struct __locale_data *__locales[13];
2740
2741
2742 const unsigned short int *__ctype_b;
2743 const int *__ctype_tolower;
2744 const int *__ctype_toupper;
2745
2746
2747 const char *__names[13];
2748 };
2749
2750 typedef struct __locale_struct *__locale_t;
2751 # 23 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 2 3 4
2752
2753 typedef __locale_t locale_t;
2754 # 61 "/usr/include/time.h" 2 3 4
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766 extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__));
2767
2768
2769
2770 extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
2771
2772
2773 extern double difftime (time_t __time1, time_t __time0)
2774 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2775
2776
2777 extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
2778 # 100 "/usr/include/time.h" 3 4
2779 extern size_t strftime (char *__restrict __s, size_t __maxsize,
2780 const char *__restrict __format,
2781 const struct tm *__restrict __tp)
2782 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3, 4)));
2783 # 117 "/usr/include/time.h" 3 4
2784 extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
2785 const char *__restrict __format,
2786 const struct tm *__restrict __tp,
2787 locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
2788 # 133 "/usr/include/time.h" 3 4
2789 extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
2790
2791
2792
2793 extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
2794 # 155 "/usr/include/time.h" 3 4
2795 extern struct tm *gmtime_r (const time_t *__restrict __timer,
2796 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
2797
2798
2799
2800 extern struct tm *localtime_r (const time_t *__restrict __timer,
2801 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
2802 # 180 "/usr/include/time.h" 3 4
2803 extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
2804
2805
2806
2807 extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
2808 # 198 "/usr/include/time.h" 3 4
2809 extern char *asctime_r (const struct tm *__restrict __tp,
2810 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
2811
2812
2813
2814 extern char *ctime_r (const time_t *__restrict __timer,
2815 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
2816 # 218 "/usr/include/time.h" 3 4
2817 extern char *__tzname[2];
2818 extern int __daylight;
2819 extern long int __timezone;
2820
2821
2822
2823
2824 extern char *tzname[2];
2825
2826
2827
2828 extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__));
2829
2830
2831
2832 extern int daylight;
2833 extern long int timezone;
2834 # 247 "/usr/include/time.h" 3 4
2835 extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
2836 # 264 "/usr/include/time.h" 3 4
2837 extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
2838
2839
2840
2841
2842
2843
2844
2845 extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2846 # 282 "/usr/include/time.h" 3 4
2847 extern int nanosleep (const struct timespec *__requested_time,
2848 struct timespec *__remaining);
2849
2850
2851 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__));
2852
2853
2854 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp)
2855 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2856
2857
2858 extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
2859 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2860 # 324 "/usr/include/time.h" 3 4
2861 extern int clock_nanosleep (clockid_t __clock_id, int __flags,
2862 const struct timespec *__req,
2863 struct timespec *__rem);
2864 # 339 "/usr/include/time.h" 3 4
2865 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__));
2866
2867
2868
2869
2870 extern int timer_create (clockid_t __clock_id,
2871 struct sigevent *__restrict __evp,
2872 timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__));
2873
2874
2875 extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
2876
2877
2878
2879 extern int timer_settime (timer_t __timerid, int __flags,
2880 const struct itimerspec *__restrict __value,
2881 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__));
2882
2883
2884 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
2885 __attribute__ ((__nothrow__ , __leaf__));
2886 # 377 "/usr/include/time.h" 3 4
2887 extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
2888
2889
2890
2891
2892
2893
2894 extern int timespec_get (struct timespec *__ts, int __base)
2895 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2896 # 453 "/usr/include/time.h" 3 4
2897
2898 # 27 "include/openssl/crypto.h" 2
2899
2900
2901
2902
2903
2904
2905
2906 # 1 "include/openssl/safestack.h" 1
2907 # 17 "include/openssl/safestack.h"
2908
2909
2910
2911
2912
2913
2914
2915 # 1 "include/openssl/stack.h" 1
2916 # 12 "include/openssl/stack.h"
2917
2918 # 23 "include/openssl/stack.h"
2919
2920 # 23 "include/openssl/stack.h"
2921 typedef struct stack_st OPENSSL_STACK;
2922
2923 typedef int (*OPENSSL_sk_compfunc)(const void *, const void *);
2924 typedef void (*OPENSSL_sk_freefunc)(void *);
2925 typedef void *(*OPENSSL_sk_copyfunc)(const void *);
2926
2927 int OPENSSL_sk_num(const OPENSSL_STACK *);
2928 void *OPENSSL_sk_value(const OPENSSL_STACK *, int);
2929
2930 void *OPENSSL_sk_set(OPENSSL_STACK *st, int i, const void *data);
2931
2932 OPENSSL_STACK *OPENSSL_sk_new(OPENSSL_sk_compfunc cmp);
2933 OPENSSL_STACK *OPENSSL_sk_new_null(void);
2934 OPENSSL_STACK *OPENSSL_sk_new_reserve(OPENSSL_sk_compfunc c, int n);
2935 int OPENSSL_sk_reserve(OPENSSL_STACK *st, int n);
2936 void OPENSSL_sk_free(OPENSSL_STACK *);
2937 void OPENSSL_sk_pop_free(OPENSSL_STACK *st, void (*func) (void *));
2938 OPENSSL_STACK *OPENSSL_sk_deep_copy(const OPENSSL_STACK *,
2939 OPENSSL_sk_copyfunc c,
2940 OPENSSL_sk_freefunc f);
2941 int OPENSSL_sk_insert(OPENSSL_STACK *sk, const void *data, int where);
2942 void *OPENSSL_sk_delete(OPENSSL_STACK *st, int loc);
2943 void *OPENSSL_sk_delete_ptr(OPENSSL_STACK *st, const void *p);
2944 int OPENSSL_sk_find(OPENSSL_STACK *st, const void *data);
2945 int OPENSSL_sk_find_ex(OPENSSL_STACK *st, const void *data);
2946 int OPENSSL_sk_find_all(OPENSSL_STACK *st, const void *data, int *pnum);
2947 int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data);
2948 int OPENSSL_sk_unshift(OPENSSL_STACK *st, const void *data);
2949 void *OPENSSL_sk_shift(OPENSSL_STACK *st);
2950 void *OPENSSL_sk_pop(OPENSSL_STACK *st);
2951 void OPENSSL_sk_zero(OPENSSL_STACK *st);
2952 OPENSSL_sk_compfunc OPENSSL_sk_set_cmp_func(OPENSSL_STACK *sk,
2953 OPENSSL_sk_compfunc cmp);
2954 OPENSSL_STACK *OPENSSL_sk_dup(const OPENSSL_STACK *st);
2955 void OPENSSL_sk_sort(OPENSSL_STACK *st);
2956 int OPENSSL_sk_is_sorted(const OPENSSL_STACK *st);
2957 # 25 "include/openssl/safestack.h" 2
2958 # 195 "include/openssl/safestack.h"
2959 typedef char *OPENSSL_STRING;
2960 typedef const char *OPENSSL_CSTRING;
2961 # 205 "include/openssl/safestack.h"
2962 struct stack_st_OPENSSL_STRING; typedef int (*sk_OPENSSL_STRING_compfunc)(const char * const *a, const char *const *b); typedef void (*sk_OPENSSL_STRING_freefunc)(char *a); typedef char * (*sk_OPENSSL_STRING_copyfunc)(const char *a); static __attribute__((unused)) inline char *ossl_check_OPENSSL_STRING_type(char *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_OPENSSL_STRING_sk_type(const struct stack_st_OPENSSL_STRING *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_OPENSSL_STRING_sk_type(struct stack_st_OPENSSL_STRING *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_OPENSSL_STRING_compfunc_type(sk_OPENSSL_STRING_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_OPENSSL_STRING_copyfunc_type(sk_OPENSSL_STRING_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_OPENSSL_STRING_freefunc_type(sk_OPENSSL_STRING_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
2963 # 231 "include/openssl/safestack.h"
2964 struct stack_st_OPENSSL_CSTRING; typedef int (*sk_OPENSSL_CSTRING_compfunc)(const char * const *a, const char *const *b); typedef void (*sk_OPENSSL_CSTRING_freefunc)(char *a); typedef char * (*sk_OPENSSL_CSTRING_copyfunc)(const char *a); static __attribute__((unused)) inline const char *ossl_check_OPENSSL_CSTRING_type(const char *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_OPENSSL_CSTRING_sk_type(const struct stack_st_OPENSSL_CSTRING *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_OPENSSL_CSTRING_sk_type(struct stack_st_OPENSSL_CSTRING *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_OPENSSL_CSTRING_compfunc_type(sk_OPENSSL_CSTRING_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_OPENSSL_CSTRING_copyfunc_type(sk_OPENSSL_CSTRING_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_OPENSSL_CSTRING_freefunc_type(sk_OPENSSL_CSTRING_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
2965 # 264 "include/openssl/safestack.h"
2966 typedef void *OPENSSL_BLOCK;
2967 struct stack_st_OPENSSL_BLOCK; typedef int (*sk_OPENSSL_BLOCK_compfunc)(const void * const *a, const void *const *b); typedef void (*sk_OPENSSL_BLOCK_freefunc)(void *a); typedef void * (*sk_OPENSSL_BLOCK_copyfunc)(const void *a); static __attribute__((unused)) inline void *ossl_check_OPENSSL_BLOCK_type(void *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_OPENSSL_BLOCK_sk_type(const struct stack_st_OPENSSL_BLOCK *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_OPENSSL_BLOCK_sk_type(struct stack_st_OPENSSL_BLOCK *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_OPENSSL_BLOCK_compfunc_type(sk_OPENSSL_BLOCK_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_OPENSSL_BLOCK_copyfunc_type(sk_OPENSSL_BLOCK_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_OPENSSL_BLOCK_freefunc_type(sk_OPENSSL_BLOCK_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
2968 # 35 "include/openssl/crypto.h" 2
2969
2970 # 1 "include/openssl/types.h" 1
2971 # 26 "include/openssl/types.h"
2972 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 1 3 4
2973 # 27 "include/openssl/types.h" 2
2974 # 36 "include/openssl/types.h"
2975 typedef struct ossl_provider_st OSSL_PROVIDER;
2976 # 57 "include/openssl/types.h"
2977 typedef struct asn1_string_st ASN1_INTEGER;
2978 typedef struct asn1_string_st ASN1_ENUMERATED;
2979 typedef struct asn1_string_st ASN1_BIT_STRING;
2980 typedef struct asn1_string_st ASN1_OCTET_STRING;
2981 typedef struct asn1_string_st ASN1_PRINTABLESTRING;
2982 typedef struct asn1_string_st ASN1_T61STRING;
2983 typedef struct asn1_string_st ASN1_IA5STRING;
2984 typedef struct asn1_string_st ASN1_GENERALSTRING;
2985 typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
2986 typedef struct asn1_string_st ASN1_BMPSTRING;
2987 typedef struct asn1_string_st ASN1_UTCTIME;
2988 typedef struct asn1_string_st ASN1_TIME;
2989 typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
2990 typedef struct asn1_string_st ASN1_VISIBLESTRING;
2991 typedef struct asn1_string_st ASN1_UTF8STRING;
2992 typedef struct asn1_string_st ASN1_STRING;
2993 typedef int ASN1_BOOLEAN;
2994 typedef int ASN1_NULL;
2995
2996
2997 typedef struct asn1_type_st ASN1_TYPE;
2998 typedef struct asn1_object_st ASN1_OBJECT;
2999 typedef struct asn1_string_table_st ASN1_STRING_TABLE;
3000
3001 typedef struct ASN1_ITEM_st ASN1_ITEM;
3002 typedef struct asn1_pctx_st ASN1_PCTX;
3003 typedef struct asn1_sctx_st ASN1_SCTX;
3004
3005
3006
3007
3008
3009 typedef struct bio_st BIO;
3010 typedef struct bignum_st BIGNUM;
3011 typedef struct bignum_ctx BN_CTX;
3012 typedef struct bn_blinding_st BN_BLINDING;
3013 typedef struct bn_mont_ctx_st BN_MONT_CTX;
3014 typedef struct bn_recp_ctx_st BN_RECP_CTX;
3015 typedef struct bn_gencb_st BN_GENCB;
3016
3017 typedef struct buf_mem_st BUF_MEM;
3018
3019 struct stack_st_BIGNUM;
3020 struct stack_st_BIGNUM_const;
3021
3022 typedef struct err_state_st ERR_STATE;
3023
3024 typedef struct evp_cipher_st EVP_CIPHER;
3025 typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
3026 typedef struct evp_md_st EVP_MD;
3027 typedef struct evp_md_ctx_st EVP_MD_CTX;
3028 typedef struct evp_mac_st EVP_MAC;
3029 typedef struct evp_mac_ctx_st EVP_MAC_CTX;
3030 typedef struct evp_pkey_st EVP_PKEY;
3031
3032 typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
3033
3034 typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
3035 typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
3036
3037 typedef struct evp_keymgmt_st EVP_KEYMGMT;
3038
3039 typedef struct evp_kdf_st EVP_KDF;
3040 typedef struct evp_kdf_ctx_st EVP_KDF_CTX;
3041
3042 typedef struct evp_rand_st EVP_RAND;
3043 typedef struct evp_rand_ctx_st EVP_RAND_CTX;
3044
3045 typedef struct evp_keyexch_st EVP_KEYEXCH;
3046
3047 typedef struct evp_signature_st EVP_SIGNATURE;
3048
3049 typedef struct evp_asym_cipher_st EVP_ASYM_CIPHER;
3050
3051 typedef struct evp_kem_st EVP_KEM;
3052
3053 typedef struct evp_Encode_Ctx_st EVP_ENCODE_CTX;
3054
3055 typedef struct hmac_ctx_st HMAC_CTX;
3056
3057 typedef struct dh_st DH;
3058 typedef struct dh_method DH_METHOD;
3059
3060
3061 typedef struct dsa_st DSA;
3062 typedef struct dsa_method DSA_METHOD;
3063
3064
3065
3066 typedef struct rsa_st RSA;
3067 typedef struct rsa_meth_st RSA_METHOD;
3068
3069 typedef struct rsa_pss_params_st RSA_PSS_PARAMS;
3070
3071
3072 typedef struct ec_key_st EC_KEY;
3073 typedef struct ec_key_method_st EC_KEY_METHOD;
3074
3075
3076 typedef struct rand_meth_st RAND_METHOD;
3077 typedef struct rand_drbg_st RAND_DRBG;
3078
3079 typedef struct ssl_dane_st SSL_DANE;
3080 typedef struct x509_st X509;
3081 typedef struct X509_algor_st X509_ALGOR;
3082 typedef struct X509_crl_st X509_CRL;
3083 typedef struct x509_crl_method_st X509_CRL_METHOD;
3084 typedef struct x509_revoked_st X509_REVOKED;
3085 typedef struct X509_name_st X509_NAME;
3086 typedef struct X509_pubkey_st X509_PUBKEY;
3087 typedef struct x509_store_st X509_STORE;
3088 typedef struct x509_store_ctx_st X509_STORE_CTX;
3089
3090 typedef struct x509_object_st X509_OBJECT;
3091 typedef struct x509_lookup_st X509_LOOKUP;
3092 typedef struct x509_lookup_method_st X509_LOOKUP_METHOD;
3093 typedef struct X509_VERIFY_PARAM_st X509_VERIFY_PARAM;
3094
3095 typedef struct x509_sig_info_st X509_SIG_INFO;
3096
3097 typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
3098
3099 typedef struct v3_ext_ctx X509V3_CTX;
3100 typedef struct conf_st CONF;
3101 typedef struct ossl_init_settings_st OPENSSL_INIT_SETTINGS;
3102
3103 typedef struct ui_st UI;
3104 typedef struct ui_method_st UI_METHOD;
3105
3106 typedef struct engine_st ENGINE;
3107 typedef struct ssl_st SSL;
3108 typedef struct ssl_ctx_st SSL_CTX;
3109
3110 typedef struct comp_ctx_st COMP_CTX;
3111 typedef struct comp_method_st COMP_METHOD;
3112
3113 typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
3114 typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
3115 typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
3116 typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
3117
3118 typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
3119 typedef struct DIST_POINT_st DIST_POINT;
3120 typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
3121 typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
3122
3123 typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
3124
3125 typedef struct ossl_http_req_ctx_st OSSL_HTTP_REQ_CTX;
3126 typedef struct ocsp_response_st OCSP_RESPONSE;
3127 typedef struct ocsp_responder_id_st OCSP_RESPID;
3128
3129 typedef struct sct_st SCT;
3130 typedef struct sct_ctx_st SCT_CTX;
3131 typedef struct ctlog_st CTLOG;
3132 typedef struct ctlog_store_st CTLOG_STORE;
3133 typedef struct ct_policy_eval_ctx_st CT_POLICY_EVAL_CTX;
3134
3135 typedef struct ossl_store_info_st OSSL_STORE_INFO;
3136 typedef struct ossl_store_search_st OSSL_STORE_SEARCH;
3137
3138 typedef struct ossl_lib_ctx_st OSSL_LIB_CTX;
3139
3140 typedef struct ossl_dispatch_st OSSL_DISPATCH;
3141 typedef struct ossl_item_st OSSL_ITEM;
3142 typedef struct ossl_algorithm_st OSSL_ALGORITHM;
3143 typedef struct ossl_param_st OSSL_PARAM;
3144 typedef struct ossl_param_bld_st OSSL_PARAM_BLD;
3145
3146 typedef int pem_password_cb (char *buf, int size, int rwflag, void *userdata);
3147
3148 typedef struct ossl_encoder_st OSSL_ENCODER;
3149 typedef struct ossl_encoder_ctx_st OSSL_ENCODER_CTX;
3150 typedef struct ossl_decoder_st OSSL_DECODER;
3151 typedef struct ossl_decoder_ctx_st OSSL_DECODER_CTX;
3152
3153 typedef struct ossl_self_test_st OSSL_SELF_TEST;
3154 # 37 "include/openssl/crypto.h" 2
3155
3156 # 1 "include/openssl/cryptoerr.h" 1
3157 # 13 "include/openssl/cryptoerr.h"
3158
3159
3160
3161 # 1 "include/openssl/symhacks.h" 1
3162 # 12 "include/openssl/symhacks.h"
3163
3164 # 17 "include/openssl/cryptoerr.h" 2
3165 # 1 "include/openssl/cryptoerr_legacy.h" 1
3166 # 19 "include/openssl/cryptoerr_legacy.h"
3167
3168 # 29 "include/openssl/cryptoerr_legacy.h"
3169 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_ASN1_strings(void);
3170 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_ASYNC_strings(void);
3171 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_BIO_strings(void);
3172 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_BN_strings(void);
3173 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_BUF_strings(void);
3174
3175 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_CMS_strings(void);
3176
3177
3178 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_COMP_strings(void);
3179
3180 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_CONF_strings(void);
3181 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_CRYPTO_strings(void);
3182
3183 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_CT_strings(void);
3184
3185
3186 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_DH_strings(void);
3187
3188
3189 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_DSA_strings(void);
3190
3191
3192 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_EC_strings(void);
3193
3194
3195 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_ENGINE_strings(void);
3196
3197 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_ERR_strings(void);
3198 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_EVP_strings(void);
3199 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_KDF_strings(void);
3200 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_OBJ_strings(void);
3201
3202 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_OCSP_strings(void);
3203
3204 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_PEM_strings(void);
3205 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_PKCS12_strings(void);
3206 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_PKCS7_strings(void);
3207 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_RAND_strings(void);
3208 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_RSA_strings(void);
3209 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_OSSL_STORE_strings(void);
3210
3211 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_TS_strings(void);
3212
3213 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_UI_strings(void);
3214 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_X509_strings(void);
3215 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_X509V3_strings(void);
3216 # 18 "include/openssl/cryptoerr.h" 2
3217 # 39 "include/openssl/crypto.h" 2
3218 # 1 "include/openssl/core.h" 1
3219 # 12 "include/openssl/core.h"
3220
3221
3222 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
3223 # 145 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 3 4
3224
3225 # 145 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 3 4
3226 typedef long int ptrdiff_t;
3227 # 425 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 3 4
3228 typedef struct {
3229 long long __max_align_ll __attribute__((__aligned__(__alignof__(long long))));
3230 long double __max_align_ld __attribute__((__aligned__(__alignof__(long double))));
3231 # 436 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 3 4
3232 } max_align_t;
3233 # 15 "include/openssl/core.h" 2
3234 # 1 "include/openssl/types.h" 1
3235 # 16 "include/openssl/core.h" 2
3236 # 30 "include/openssl/core.h"
3237
3238 # 30 "include/openssl/core.h"
3239 typedef struct ossl_core_handle_st OSSL_CORE_HANDLE;
3240 typedef struct openssl_core_ctx_st OPENSSL_CORE_CTX;
3241 typedef struct ossl_core_bio_st OSSL_CORE_BIO;
3242
3243
3244
3245
3246
3247
3248
3249 struct ossl_dispatch_st {
3250 int function_id;
3251 void (*function)(void);
3252 };
3253 # 61 "include/openssl/core.h"
3254 struct ossl_item_st {
3255 unsigned int id;
3256 void *ptr;
3257 };
3258
3259
3260
3261
3262
3263
3264
3265 struct ossl_algorithm_st {
3266 const char *algorithm_names;
3267 const char *property_definition;
3268 const OSSL_DISPATCH *implementation;
3269 const char *algorithm_description;
3270 };
3271
3272
3273
3274
3275
3276
3277
3278 struct ossl_param_st {
3279 const char *key;
3280 unsigned int data_type;
3281 void *data;
3282 size_t data_size;
3283 size_t return_size;
3284 };
3285 # 172 "include/openssl/core.h"
3286 typedef void (*OSSL_thread_stop_handler_fn)(void *arg);
3287 # 193 "include/openssl/core.h"
3288 typedef int (OSSL_provider_init_fn)(const OSSL_CORE_HANDLE *handle,
3289 const OSSL_DISPATCH *in,
3290 const OSSL_DISPATCH **out,
3291 void **provctx);
3292
3293
3294
3295
3296 extern OSSL_provider_init_fn OSSL_provider_init;
3297 # 219 "include/openssl/core.h"
3298 typedef int (OSSL_CALLBACK)(const OSSL_PARAM params[], void *arg);
3299 typedef int (OSSL_INOUT_CALLBACK)(const OSSL_PARAM in_params[],
3300 OSSL_PARAM out_params[], void *arg);
3301
3302
3303
3304
3305
3306
3307 typedef int (OSSL_PASSPHRASE_CALLBACK)(char *pass, size_t pass_size,
3308 size_t *pass_len,
3309 const OSSL_PARAM params[], void *arg);
3310 # 40 "include/openssl/crypto.h" 2
3311 # 73 "include/openssl/crypto.h"
3312 typedef struct {
3313 int dummy;
3314 } CRYPTO_dynlock;
3315
3316
3317
3318 typedef void CRYPTO_RWLOCK;
3319
3320 CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void);
3321 int CRYPTO_THREAD_read_lock(CRYPTO_RWLOCK *lock);
3322 int CRYPTO_THREAD_write_lock(CRYPTO_RWLOCK *lock);
3323 int CRYPTO_THREAD_unlock(CRYPTO_RWLOCK *lock);
3324 void CRYPTO_THREAD_lock_free(CRYPTO_RWLOCK *lock);
3325
3326 int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock);
3327 int CRYPTO_atomic_or(uint64_t *val, uint64_t op, uint64_t *ret,
3328 CRYPTO_RWLOCK *lock);
3329 int CRYPTO_atomic_load(uint64_t *val, uint64_t *ret, CRYPTO_RWLOCK *lock);
3330 int CRYPTO_atomic_load_int(int *val, int *ret, CRYPTO_RWLOCK *lock);
3331 # 125 "include/openssl/crypto.h"
3332 size_t OPENSSL_strlcpy(char *dst, const char *src, size_t siz);
3333 size_t OPENSSL_strlcat(char *dst, const char *src, size_t siz);
3334 size_t OPENSSL_strnlen(const char *str, size_t maxlen);
3335 int OPENSSL_buf2hexstr_ex(char *str, size_t str_n, size_t *strlength,
3336 const unsigned char *buf, size_t buflen,
3337 const char sep);
3338 char *OPENSSL_buf2hexstr(const unsigned char *buf, long buflen);
3339 int OPENSSL_hexstr2buf_ex(unsigned char *buf, size_t buf_n, size_t *buflen,
3340 const char *str, const char sep);
3341 unsigned char *OPENSSL_hexstr2buf(const char *str, long *buflen);
3342 int OPENSSL_hexchar2int(unsigned char c);
3343 int OPENSSL_strcasecmp(const char *s1, const char *s2);
3344 int OPENSSL_strncasecmp(const char *s1, const char *s2, size_t n);
3345 # 146 "include/openssl/crypto.h"
3346 unsigned int OPENSSL_version_major(void);
3347 unsigned int OPENSSL_version_minor(void);
3348 unsigned int OPENSSL_version_patch(void);
3349 const char *OPENSSL_version_pre_release(void);
3350 const char *OPENSSL_version_build_metadata(void);
3351
3352 unsigned long OpenSSL_version_num(void);
3353 const char *OpenSSL_version(int type);
3354 # 165 "include/openssl/crypto.h"
3355 const char *OPENSSL_info(int type);
3356 # 179 "include/openssl/crypto.h"
3357 int OPENSSL_issetugid(void);
3358
3359 struct crypto_ex_data_st {
3360 OSSL_LIB_CTX *ctx;
3361 struct stack_st_void *sk;
3362 };
3363
3364 struct stack_st_void; typedef int (*sk_void_compfunc)(const void * const *a, const void *const *b); typedef void (*sk_void_freefunc)(void *a); typedef void * (*sk_void_copyfunc)(const void *a); static __attribute__((unused)) inline void *ossl_check_void_type(void *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_void_sk_type(const struct stack_st_void *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_void_sk_type(struct stack_st_void *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_void_compfunc_type(sk_void_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_void_copyfunc_type(sk_void_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_void_freefunc_type(sk_void_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
3365 # 239 "include/openssl/crypto.h"
3366 typedef void CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
3367 int idx, long argl, void *argp);
3368 typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
3369 int idx, long argl, void *argp);
3370 typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from,
3371 void **from_d, int idx, long argl, void *argp);
3372 int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
3373 CRYPTO_EX_new *new_func,
3374 CRYPTO_EX_dup *dup_func,
3375 CRYPTO_EX_free *free_func);
3376
3377 int CRYPTO_free_ex_index(int class_index, int idx);
3378
3379
3380
3381
3382
3383 int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
3384 int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
3385 const CRYPTO_EX_DATA *from);
3386
3387 void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
3388
3389
3390 int CRYPTO_alloc_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad,
3391 int idx);
3392
3393
3394
3395
3396
3397 int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
3398 void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
3399 # 307 "include/openssl/crypto.h"
3400 typedef struct crypto_threadid_st {
3401 int dummy;
3402 } CRYPTO_THREADID;
3403 # 334 "include/openssl/crypto.h"
3404 typedef void *(*CRYPTO_malloc_fn)(size_t num, const char *file, int line);
3405 typedef void *(*CRYPTO_realloc_fn)(void *addr, size_t num, const char *file,
3406 int line);
3407 typedef void (*CRYPTO_free_fn)(void *addr, const char *file, int line);
3408 int CRYPTO_set_mem_functions(CRYPTO_malloc_fn malloc_fn,
3409 CRYPTO_realloc_fn realloc_fn,
3410 CRYPTO_free_fn free_fn);
3411 void CRYPTO_get_mem_functions(CRYPTO_malloc_fn *malloc_fn,
3412 CRYPTO_realloc_fn *realloc_fn,
3413 CRYPTO_free_fn *free_fn);
3414
3415 __attribute__((__malloc__)) void *CRYPTO_malloc(size_t num, const char *file, int line);
3416 __attribute__((__malloc__)) void *CRYPTO_zalloc(size_t num, const char *file, int line);
3417 __attribute__((__malloc__)) void *CRYPTO_memdup(const void *str, size_t siz, const char *file, int line);
3418 __attribute__((__malloc__)) char *CRYPTO_strdup(const char *str, const char *file, int line);
3419 __attribute__((__malloc__)) char *CRYPTO_strndup(const char *str, size_t s, const char *file, int line);
3420 void CRYPTO_free(void *ptr, const char *file, int line);
3421 void CRYPTO_clear_free(void *ptr, size_t num, const char *file, int line);
3422 void *CRYPTO_realloc(void *addr, size_t num, const char *file, int line);
3423 void *CRYPTO_clear_realloc(void *addr, size_t old_num, size_t num,
3424 const char *file, int line);
3425
3426 int CRYPTO_secure_malloc_init(size_t sz, size_t minsize);
3427 int CRYPTO_secure_malloc_done(void);
3428 __attribute__((__malloc__)) void *CRYPTO_secure_malloc(size_t num, const char *file, int line);
3429 __attribute__((__malloc__)) void *CRYPTO_secure_zalloc(size_t num, const char *file, int line);
3430 void CRYPTO_secure_free(void *ptr, const char *file, int line);
3431 void CRYPTO_secure_clear_free(void *ptr, size_t num,
3432 const char *file, int line);
3433 int CRYPTO_secure_allocated(const void *ptr);
3434 int CRYPTO_secure_malloc_initialized(void);
3435 size_t CRYPTO_secure_actual_size(void *ptr);
3436 size_t CRYPTO_secure_used(void);
3437
3438 void OPENSSL_cleanse(void *ptr, size_t len);
3439 # 416 "include/openssl/crypto.h"
3440 _Noreturn void OPENSSL_die(const char *assertion, const char *file, int line);
3441
3442
3443
3444
3445
3446
3447 int OPENSSL_isservice(void);
3448
3449 void OPENSSL_init(void);
3450
3451
3452 __attribute__((deprecated("Since OpenSSL " "3.0"))) void OPENSSL_fork_prepare(void);
3453 __attribute__((deprecated("Since OpenSSL " "3.0"))) void OPENSSL_fork_parent(void);
3454 __attribute__((deprecated("Since OpenSSL " "3.0"))) void OPENSSL_fork_child(void);
3455
3456
3457
3458 struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result);
3459 int OPENSSL_gmtime_adj(struct tm *tm, int offset_day, long offset_sec);
3460 int OPENSSL_gmtime_diff(int *pday, int *psec,
3461 const struct tm *from, const struct tm *to);
3462 # 446 "include/openssl/crypto.h"
3463 int CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len);
3464 # 485 "include/openssl/crypto.h"
3465 void OPENSSL_cleanup(void);
3466 int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
3467 int OPENSSL_atexit(void (*handler)(void));
3468 void OPENSSL_thread_stop(void);
3469 void OPENSSL_thread_stop_ex(OSSL_LIB_CTX *ctx);
3470
3471
3472 OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void);
3473
3474 int OPENSSL_INIT_set_config_filename(OPENSSL_INIT_SETTINGS *settings,
3475 const char *config_filename);
3476 void OPENSSL_INIT_set_config_file_flags(OPENSSL_INIT_SETTINGS *settings,
3477 unsigned long flags);
3478 int OPENSSL_INIT_set_config_appname(OPENSSL_INIT_SETTINGS *settings,
3479 const char *config_appname);
3480
3481 void OPENSSL_INIT_free(OPENSSL_INIT_SETTINGS *settings);
3482 # 519 "include/openssl/crypto.h"
3483 # 1 "/usr/include/pthread.h" 1 3 4
3484 # 22 "/usr/include/pthread.h" 3 4
3485 # 1 "/usr/include/sched.h" 1 3 4
3486 # 29 "/usr/include/sched.h" 3 4
3487 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
3488 # 30 "/usr/include/sched.h" 2 3 4
3489 # 43 "/usr/include/sched.h" 3 4
3490 # 1 "/usr/include/x86_64-linux-gnu/bits/sched.h" 1 3 4
3491 # 80 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4
3492 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h" 1 3 4
3493 # 23 "/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h" 3 4
3494
3495 # 23 "/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h" 3 4
3496 struct sched_param
3497 {
3498 int sched_priority;
3499 };
3500 # 81 "/usr/include/x86_64-linux-gnu/bits/sched.h" 2 3 4
3501
3502
3503 # 102 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4
3504
3505 # 44 "/usr/include/sched.h" 2 3 4
3506 # 1 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 1 3 4
3507 # 32 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4
3508 typedef unsigned long int __cpu_mask;
3509
3510
3511
3512
3513
3514
3515 typedef struct
3516 {
3517 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
3518 } cpu_set_t;
3519 # 115 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4
3520
3521
3522 extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
3523 __attribute__ ((__nothrow__ , __leaf__));
3524 extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
3525 extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ , __leaf__));
3526
3527
3528 # 45 "/usr/include/sched.h" 2 3 4
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538 extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
3539 __attribute__ ((__nothrow__ , __leaf__));
3540
3541
3542 extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
3543
3544
3545 extern int sched_setscheduler (__pid_t __pid, int __policy,
3546 const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
3547
3548
3549 extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
3550
3551
3552 extern int sched_yield (void) __attribute__ ((__nothrow__ , __leaf__));
3553
3554
3555 extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
3556
3557
3558 extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
3559
3560
3561
3562 extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ , __leaf__));
3563 # 138 "/usr/include/sched.h" 3 4
3564
3565 # 23 "/usr/include/pthread.h" 2 3 4
3566
3567
3568
3569
3570 # 1 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 1 3 4
3571 # 26 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4
3572 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
3573 # 27 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 2 3 4
3574
3575
3576
3577
3578 typedef long int __jmp_buf[8];
3579 # 28 "/usr/include/pthread.h" 2 3 4
3580 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
3581 # 29 "/usr/include/pthread.h" 2 3 4
3582
3583
3584 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h" 1 3 4
3585 # 26 "/usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h" 3 4
3586 struct __jmp_buf_tag
3587 {
3588
3589
3590
3591
3592 __jmp_buf __jmpbuf;
3593 int __mask_was_saved;
3594 __sigset_t __saved_mask;
3595 };
3596 # 32 "/usr/include/pthread.h" 2 3 4
3597
3598
3599
3600
3601
3602 enum
3603 {
3604 PTHREAD_CREATE_JOINABLE,
3605
3606 PTHREAD_CREATE_DETACHED
3607
3608 };
3609
3610
3611
3612 enum
3613 {
3614 PTHREAD_MUTEX_TIMED_NP,
3615 PTHREAD_MUTEX_RECURSIVE_NP,
3616 PTHREAD_MUTEX_ERRORCHECK_NP,
3617 PTHREAD_MUTEX_ADAPTIVE_NP
3618
3619 ,
3620 PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
3621 PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
3622 PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
3623 PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
3624
3625
3626
3627
3628
3629 };
3630
3631
3632
3633
3634 enum
3635 {
3636 PTHREAD_MUTEX_STALLED,
3637 PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
3638 PTHREAD_MUTEX_ROBUST,
3639 PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
3640 };
3641
3642
3643
3644
3645
3646 enum
3647 {
3648 PTHREAD_PRIO_NONE,
3649 PTHREAD_PRIO_INHERIT,
3650 PTHREAD_PRIO_PROTECT
3651 };
3652 # 104 "/usr/include/pthread.h" 3 4
3653 enum
3654 {
3655 PTHREAD_RWLOCK_PREFER_READER_NP,
3656 PTHREAD_RWLOCK_PREFER_WRITER_NP,
3657 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
3658 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
3659 };
3660 # 124 "/usr/include/pthread.h" 3 4
3661 enum
3662 {
3663 PTHREAD_INHERIT_SCHED,
3664
3665 PTHREAD_EXPLICIT_SCHED
3666
3667 };
3668
3669
3670
3671 enum
3672 {
3673 PTHREAD_SCOPE_SYSTEM,
3674
3675 PTHREAD_SCOPE_PROCESS
3676
3677 };
3678
3679
3680
3681 enum
3682 {
3683 PTHREAD_PROCESS_PRIVATE,
3684
3685 PTHREAD_PROCESS_SHARED
3686
3687 };
3688 # 159 "/usr/include/pthread.h" 3 4
3689 struct _pthread_cleanup_buffer
3690 {
3691 void (*__routine) (void *);
3692 void *__arg;
3693 int __canceltype;
3694 struct _pthread_cleanup_buffer *__prev;
3695 };
3696
3697
3698 enum
3699 {
3700 PTHREAD_CANCEL_ENABLE,
3701
3702 PTHREAD_CANCEL_DISABLE
3703
3704 };
3705 enum
3706 {
3707 PTHREAD_CANCEL_DEFERRED,
3708
3709 PTHREAD_CANCEL_ASYNCHRONOUS
3710
3711 };
3712 # 197 "/usr/include/pthread.h" 3 4
3713
3714
3715
3716
3717
3718 extern int pthread_create (pthread_t *__restrict __newthread,
3719 const pthread_attr_t *__restrict __attr,
3720 void *(*__start_routine) (void *),
3721 void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
3722
3723
3724
3725
3726
3727 extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
3728
3729
3730
3731
3732
3733
3734
3735 extern int pthread_join (pthread_t __th, void **__thread_return);
3736 # 269 "/usr/include/pthread.h" 3 4
3737 extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ , __leaf__));
3738
3739
3740
3741 extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3742
3743
3744 extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)
3745 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3746
3747
3748
3749
3750
3751
3752
3753 extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3754
3755
3756 extern int pthread_attr_destroy (pthread_attr_t *__attr)
3757 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3758
3759
3760 extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
3761 int *__detachstate)
3762 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3763
3764
3765 extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
3766 int __detachstate)
3767 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3768
3769
3770
3771 extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,
3772 size_t *__guardsize)
3773 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3774
3775
3776 extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
3777 size_t __guardsize)
3778 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3779
3780
3781
3782 extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,
3783 struct sched_param *__restrict __param)
3784 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3785
3786
3787 extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
3788 const struct sched_param *__restrict
3789 __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3790
3791
3792 extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
3793 __attr, int *__restrict __policy)
3794 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3795
3796
3797 extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
3798 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3799
3800
3801 extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
3802 __attr, int *__restrict __inherit)
3803 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3804
3805
3806 extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
3807 int __inherit)
3808 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3809
3810
3811
3812 extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
3813 int *__restrict __scope)
3814 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3815
3816
3817 extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
3818 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3819
3820
3821 extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
3822 __attr, void **__restrict __stackaddr)
3823 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
3824
3825
3826
3827
3828
3829 extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
3830 void *__stackaddr)
3831 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
3832
3833
3834 extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
3835 __attr, size_t *__restrict __stacksize)
3836 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3837
3838
3839
3840
3841 extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
3842 size_t __stacksize)
3843 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3844
3845
3846
3847 extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
3848 void **__restrict __stackaddr,
3849 size_t *__restrict __stacksize)
3850 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
3851
3852
3853
3854
3855 extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
3856 size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3857 # 441 "/usr/include/pthread.h" 3 4
3858 extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
3859 const struct sched_param *__param)
3860 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
3861
3862
3863 extern int pthread_getschedparam (pthread_t __target_thread,
3864 int *__restrict __policy,
3865 struct sched_param *__restrict __param)
3866 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
3867
3868
3869 extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
3870 __attribute__ ((__nothrow__ , __leaf__));
3871 # 509 "/usr/include/pthread.h" 3 4
3872 extern int pthread_once (pthread_once_t *__once_control,
3873 void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
3874 # 521 "/usr/include/pthread.h" 3 4
3875 extern int pthread_setcancelstate (int __state, int *__oldstate);
3876
3877
3878
3879 extern int pthread_setcanceltype (int __type, int *__oldtype);
3880
3881
3882 extern int pthread_cancel (pthread_t __th);
3883
3884
3885
3886
3887 extern void pthread_testcancel (void);
3888
3889
3890
3891
3892 struct __cancel_jmp_buf_tag
3893 {
3894 __jmp_buf __cancel_jmp_buf;
3895 int __mask_was_saved;
3896 };
3897
3898 typedef struct
3899 {
3900 struct __cancel_jmp_buf_tag __cancel_jmp_buf[1];
3901 void *__pad[4];
3902 } __pthread_unwind_buf_t __attribute__ ((__aligned__));
3903 # 557 "/usr/include/pthread.h" 3 4
3904 struct __pthread_cleanup_frame
3905 {
3906 void (*__cancel_routine) (void *);
3907 void *__cancel_arg;
3908 int __do_it;
3909 int __cancel_type;
3910 };
3911 # 697 "/usr/include/pthread.h" 3 4
3912 extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
3913 ;
3914 # 709 "/usr/include/pthread.h" 3 4
3915 extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
3916 ;
3917 # 750 "/usr/include/pthread.h" 3 4
3918 extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
3919 __attribute__ ((__noreturn__))
3920
3921 __attribute__ ((__weak__))
3922
3923 ;
3924 # 766 "/usr/include/pthread.h" 3 4
3925 extern int __sigsetjmp_cancel (struct __cancel_jmp_buf_tag __env[1], int __savemask) __asm__ ("" "__sigsetjmp") __attribute__ ((__nothrow__))
3926
3927
3928 __attribute__ ((__returns_twice__));
3929 # 781 "/usr/include/pthread.h" 3 4
3930 extern int pthread_mutex_init (pthread_mutex_t *__mutex,
3931 const pthread_mutexattr_t *__mutexattr)
3932 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3933
3934
3935 extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
3936 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3937
3938
3939 extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
3940 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3941
3942
3943 extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
3944 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3945
3946
3947
3948
3949 extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
3950 const struct timespec *__restrict
3951 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3952 # 835 "/usr/include/pthread.h" 3 4
3953 extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
3954 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3955
3956
3957
3958 extern int pthread_mutex_getprioceiling (const pthread_mutex_t *
3959 __restrict __mutex,
3960 int *__restrict __prioceiling)
3961 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3962
3963
3964
3965 extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
3966 int __prioceiling,
3967 int *__restrict __old_ceiling)
3968 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
3969
3970
3971
3972
3973 extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
3974 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3975 # 874 "/usr/include/pthread.h" 3 4
3976 extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
3977 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3978
3979
3980 extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
3981 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3982
3983
3984 extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
3985 __restrict __attr,
3986 int *__restrict __pshared)
3987 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3988
3989
3990 extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
3991 int __pshared)
3992 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3993
3994
3995
3996 extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
3997 __attr, int *__restrict __kind)
3998 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3999
4000
4001
4002
4003 extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
4004 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4005
4006
4007
4008 extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *
4009 __restrict __attr,
4010 int *__restrict __protocol)
4011 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4012
4013
4014
4015 extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
4016 int __protocol)
4017 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4018
4019
4020 extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *
4021 __restrict __attr,
4022 int *__restrict __prioceiling)
4023 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4024
4025
4026 extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
4027 int __prioceiling)
4028 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4029
4030
4031
4032 extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
4033 int *__robustness)
4034 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4035 # 946 "/usr/include/pthread.h" 3 4
4036 extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
4037 int __robustness)
4038 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4039 # 967 "/usr/include/pthread.h" 3 4
4040 extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
4041 const pthread_rwlockattr_t *__restrict
4042 __attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4043
4044
4045 extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
4046 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4047
4048
4049 extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
4050 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4051
4052
4053 extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
4054 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4055
4056
4057
4058
4059 extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
4060 const struct timespec *__restrict
4061 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4062 # 1023 "/usr/include/pthread.h" 3 4
4063 extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
4064 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4065
4066
4067 extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
4068 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4069
4070
4071
4072
4073 extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
4074 const struct timespec *__restrict
4075 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4076 # 1071 "/usr/include/pthread.h" 3 4
4077 extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
4078 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4079
4080
4081
4082
4083
4084 extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
4085 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4086
4087
4088 extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
4089 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4090
4091
4092 extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
4093 __restrict __attr,
4094 int *__restrict __pshared)
4095 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4096
4097
4098 extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
4099 int __pshared)
4100 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4101
4102
4103 extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *
4104 __restrict __attr,
4105 int *__restrict __pref)
4106 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4107
4108
4109 extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
4110 int __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4111
4112
4113
4114
4115
4116
4117
4118 extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
4119 const pthread_condattr_t *__restrict __cond_attr)
4120 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4121
4122
4123 extern int pthread_cond_destroy (pthread_cond_t *__cond)
4124 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4125
4126
4127 extern int pthread_cond_signal (pthread_cond_t *__cond)
4128 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4129
4130
4131 extern int pthread_cond_broadcast (pthread_cond_t *__cond)
4132 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4133
4134
4135
4136
4137
4138
4139 extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
4140 pthread_mutex_t *__restrict __mutex)
4141 __attribute__ ((__nonnull__ (1, 2)));
4142 # 1145 "/usr/include/pthread.h" 3 4
4143 extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
4144 pthread_mutex_t *__restrict __mutex,
4145 const struct timespec *__restrict __abstime)
4146 __attribute__ ((__nonnull__ (1, 2, 3)));
4147 # 1194 "/usr/include/pthread.h" 3 4
4148 extern int pthread_condattr_init (pthread_condattr_t *__attr)
4149 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4150
4151
4152 extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
4153 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4154
4155
4156 extern int pthread_condattr_getpshared (const pthread_condattr_t *
4157 __restrict __attr,
4158 int *__restrict __pshared)
4159 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4160
4161
4162 extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
4163 int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4164
4165
4166
4167 extern int pthread_condattr_getclock (const pthread_condattr_t *
4168 __restrict __attr,
4169 __clockid_t *__restrict __clock_id)
4170 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4171
4172
4173 extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
4174 __clockid_t __clock_id)
4175 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4176 # 1230 "/usr/include/pthread.h" 3 4
4177 extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
4178 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4179
4180
4181 extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
4182 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4183
4184
4185 extern int pthread_spin_lock (pthread_spinlock_t *__lock)
4186 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4187
4188
4189 extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
4190 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4191
4192
4193 extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
4194 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4195
4196
4197
4198
4199
4200
4201 extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
4202 const pthread_barrierattr_t *__restrict
4203 __attr, unsigned int __count)
4204 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4205
4206
4207 extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
4208 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4209
4210
4211 extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
4212 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4213
4214
4215
4216 extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
4217 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4218
4219
4220 extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
4221 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4222
4223
4224 extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
4225 __restrict __attr,
4226 int *__restrict __pshared)
4227 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4228
4229
4230 extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
4231 int __pshared)
4232 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4233 # 1297 "/usr/include/pthread.h" 3 4
4234 extern int pthread_key_create (pthread_key_t *__key,
4235 void (*__destr_function) (void *))
4236 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4237
4238
4239 extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
4240
4241
4242 extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
4243
4244
4245 extern int pthread_setspecific (pthread_key_t __key,
4246 const void *__pointer)
4247 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__none__, 2)));
4248
4249
4250
4251
4252 extern int pthread_getcpuclockid (pthread_t __thread_id,
4253 __clockid_t *__clock_id)
4254 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
4255 # 1332 "/usr/include/pthread.h" 3 4
4256 extern int pthread_atfork (void (*__prepare) (void),
4257 void (*__parent) (void),
4258 void (*__child) (void)) __attribute__ ((__nothrow__ , __leaf__));
4259
4260
4261
4262
4263 extern __inline __attribute__ ((__gnu_inline__)) int
4264 __attribute__ ((__nothrow__ , __leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2)
4265 {
4266 return __thread1 == __thread2;
4267 }
4268
4269
4270
4271 # 520 "include/openssl/crypto.h" 2
4272
4273
4274 # 521 "include/openssl/crypto.h"
4275 typedef pthread_once_t CRYPTO_ONCE;
4276 typedef pthread_key_t CRYPTO_THREAD_LOCAL;
4277 typedef pthread_t CRYPTO_THREAD_ID;
4278 # 536 "include/openssl/crypto.h"
4279 int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void));
4280
4281 int CRYPTO_THREAD_init_local(CRYPTO_THREAD_LOCAL *key, void (*cleanup)(void *));
4282 void *CRYPTO_THREAD_get_local(CRYPTO_THREAD_LOCAL *key);
4283 int CRYPTO_THREAD_set_local(CRYPTO_THREAD_LOCAL *key, void *val);
4284 int CRYPTO_THREAD_cleanup_local(CRYPTO_THREAD_LOCAL *key);
4285
4286 CRYPTO_THREAD_ID CRYPTO_THREAD_get_current_id(void);
4287 int CRYPTO_THREAD_compare_id(CRYPTO_THREAD_ID a, CRYPTO_THREAD_ID b);
4288
4289 OSSL_LIB_CTX *OSSL_LIB_CTX_new(void);
4290 OSSL_LIB_CTX *OSSL_LIB_CTX_new_from_dispatch(const OSSL_CORE_HANDLE *handle,
4291 const OSSL_DISPATCH *in);
4292 OSSL_LIB_CTX *OSSL_LIB_CTX_new_child(const OSSL_CORE_HANDLE *handle,
4293 const OSSL_DISPATCH *in);
4294 int OSSL_LIB_CTX_load_config(OSSL_LIB_CTX *ctx, const char *config_file);
4295 void OSSL_LIB_CTX_free(OSSL_LIB_CTX *);
4296 OSSL_LIB_CTX *OSSL_LIB_CTX_get0_global_default(void);
4297 OSSL_LIB_CTX *OSSL_LIB_CTX_set0_default(OSSL_LIB_CTX *libctx);
4298
4299 void OSSL_sleep(uint64_t millis);
4300 # 18 "include/internal/e_os.h" 2
4301 # 1 "include/internal/numbers.h" 1
4302 # 12 "include/internal/numbers.h"
4303
4304
4305 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 1 3 4
4306 # 15 "include/internal/numbers.h" 2
4307 # 91 "include/internal/numbers.h"
4308 typedef __int128_t int128_t;
4309 typedef __uint128_t uint128_t;
4310 # 19 "include/internal/e_os.h" 2
4311 # 188 "include/internal/e_os.h"
4312 # 1 "/usr/include/x86_64-linux-gnu/sys/time.h" 1 3 4
4313 # 34 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4314
4315 # 52 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4316
4317 # 52 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4318 struct timezone
4319 {
4320 int tz_minuteswest;
4321 int tz_dsttime;
4322 };
4323 # 67 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4324 extern int gettimeofday (struct timeval *__restrict __tv,
4325 void *__restrict __tz) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4326 # 86 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4327 extern int settimeofday (const struct timeval *__tv,
4328 const struct timezone *__tz)
4329 __attribute__ ((__nothrow__ , __leaf__));
4330
4331
4332
4333
4334
4335 extern int adjtime (const struct timeval *__delta,
4336 struct timeval *__olddelta) __attribute__ ((__nothrow__ , __leaf__));
4337 # 114 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4338 enum __itimer_which
4339 {
4340
4341 ITIMER_REAL = 0,
4342
4343
4344 ITIMER_VIRTUAL = 1,
4345
4346
4347
4348 ITIMER_PROF = 2
4349
4350 };
4351
4352
4353
4354 struct itimerval
4355 {
4356
4357 struct timeval it_interval;
4358
4359 struct timeval it_value;
4360 };
4361
4362
4363
4364
4365
4366
4367 typedef int __itimer_which_t;
4368
4369
4370
4371
4372
4373 extern int getitimer (__itimer_which_t __which,
4374 struct itimerval *__value) __attribute__ ((__nothrow__ , __leaf__));
4375
4376
4377
4378
4379 extern int setitimer (__itimer_which_t __which,
4380 const struct itimerval *__restrict __new,
4381 struct itimerval *__restrict __old) __attribute__ ((__nothrow__ , __leaf__));
4382
4383
4384
4385
4386 extern int utimes (const char *__file, const struct timeval __tvp[2])
4387 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4388 # 189 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4389 extern int lutimes (const char *__file, const struct timeval __tvp[2])
4390 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4391
4392
4393 extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__));
4394 # 258 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4395
4396 # 189 "include/internal/e_os.h" 2
4397 # 236 "include/internal/e_os.h"
4398 # 1 "/usr/include/unistd.h" 1 3 4
4399 # 27 "/usr/include/unistd.h" 3 4
4400
4401 # 202 "/usr/include/unistd.h" 3 4
4402 # 1 "/usr/include/x86_64-linux-gnu/bits/posix_opt.h" 1 3 4
4403 # 203 "/usr/include/unistd.h" 2 3 4
4404
4405
4406
4407 # 1 "/usr/include/x86_64-linux-gnu/bits/environments.h" 1 3 4
4408 # 22 "/usr/include/x86_64-linux-gnu/bits/environments.h" 3 4
4409 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
4410 # 23 "/usr/include/x86_64-linux-gnu/bits/environments.h" 2 3 4
4411 # 207 "/usr/include/unistd.h" 2 3 4
4412 # 226 "/usr/include/unistd.h" 3 4
4413 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
4414 # 227 "/usr/include/unistd.h" 2 3 4
4415 # 255 "/usr/include/unistd.h" 3 4
4416 typedef __useconds_t useconds_t;
4417 # 274 "/usr/include/unistd.h" 3 4
4418 typedef __socklen_t socklen_t;
4419 # 287 "/usr/include/unistd.h" 3 4
4420 extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4421 # 309 "/usr/include/unistd.h" 3 4
4422 extern int faccessat (int __fd, const char *__file, int __type, int __flag)
4423 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
4424 # 339 "/usr/include/unistd.h" 3 4
4425 extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__));
4426 # 358 "/usr/include/unistd.h" 3 4
4427 extern int close (int __fd);
4428
4429
4430
4431
4432 extern void closefrom (int __lowfd) __attribute__ ((__nothrow__ , __leaf__));
4433
4434
4435
4436
4437
4438
4439
4440 extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__))
4441 __attribute__ ((__access__ (__write_only__, 2)));
4442
4443
4444
4445
4446
4447 extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__))
4448 __attribute__ ((__access__ (__read_only__, 2, 3)));
4449 # 389 "/usr/include/unistd.h" 3 4
4450 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
4451 __off_t __offset) __attribute__ ((__warn_unused_result__))
4452 __attribute__ ((__access__ (__write_only__, 2)));
4453
4454
4455
4456
4457
4458
4459 extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
4460 __off_t __offset) __attribute__ ((__warn_unused_result__))
4461 __attribute__ ((__access__ (__read_only__, 2, 3)));
4462 # 437 "/usr/include/unistd.h" 3 4
4463 extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
4464 # 452 "/usr/include/unistd.h" 3 4
4465 extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__));
4466 # 464 "/usr/include/unistd.h" 3 4
4467 extern unsigned int sleep (unsigned int __seconds);
4468
4469
4470
4471
4472
4473
4474
4475 extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
4476 __attribute__ ((__nothrow__ , __leaf__));
4477
4478
4479
4480
4481
4482
4483 extern int usleep (__useconds_t __useconds);
4484 # 489 "/usr/include/unistd.h" 3 4
4485 extern int pause (void);
4486
4487
4488
4489 extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
4490 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4491
4492
4493
4494 extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
4495
4496
4497
4498
4499 extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
4500 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4501
4502
4503
4504
4505
4506
4507 extern int fchownat (int __fd, const char *__file, __uid_t __owner,
4508 __gid_t __group, int __flag)
4509 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
4510
4511
4512
4513 extern int chdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4514
4515
4516
4517 extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
4518 # 531 "/usr/include/unistd.h" 3 4
4519 extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
4520 # 545 "/usr/include/unistd.h" 3 4
4521 extern char *getwd (char *__buf)
4522 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__))
4523 __attribute__ ((__access__ (__write_only__, 1)));
4524
4525
4526
4527
4528 extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
4529
4530
4531 extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__));
4532 # 564 "/usr/include/unistd.h" 3 4
4533 extern char **__environ;
4534
4535
4536
4537
4538
4539
4540
4541 extern int execve (const char *__path, char *const __argv[],
4542 char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4543
4544
4545
4546
4547 extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
4548 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
4549
4550
4551
4552
4553 extern int execv (const char *__path, char *const __argv[])
4554 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4555
4556
4557
4558 extern int execle (const char *__path, const char *__arg, ...)
4559 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4560
4561
4562
4563 extern int execl (const char *__path, const char *__arg, ...)
4564 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4565
4566
4567
4568 extern int execvp (const char *__file, char *const __argv[])
4569 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4570
4571
4572
4573
4574 extern int execlp (const char *__file, const char *__arg, ...)
4575 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4576 # 619 "/usr/include/unistd.h" 3 4
4577 extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
4578
4579
4580
4581
4582 extern void _exit (int __status) __attribute__ ((__noreturn__));
4583
4584
4585
4586
4587
4588 # 1 "/usr/include/x86_64-linux-gnu/bits/confname.h" 1 3 4
4589 # 24 "/usr/include/x86_64-linux-gnu/bits/confname.h" 3 4
4590 enum
4591 {
4592 _PC_LINK_MAX,
4593
4594 _PC_MAX_CANON,
4595
4596 _PC_MAX_INPUT,
4597
4598 _PC_NAME_MAX,
4599
4600 _PC_PATH_MAX,
4601
4602 _PC_PIPE_BUF,
4603
4604 _PC_CHOWN_RESTRICTED,
4605
4606 _PC_NO_TRUNC,
4607
4608 _PC_VDISABLE,
4609
4610 _PC_SYNC_IO,
4611
4612 _PC_ASYNC_IO,
4613
4614 _PC_PRIO_IO,
4615
4616 _PC_SOCK_MAXBUF,
4617
4618 _PC_FILESIZEBITS,
4619
4620 _PC_REC_INCR_XFER_SIZE,
4621
4622 _PC_REC_MAX_XFER_SIZE,
4623
4624 _PC_REC_MIN_XFER_SIZE,
4625
4626 _PC_REC_XFER_ALIGN,
4627
4628 _PC_ALLOC_SIZE_MIN,
4629
4630 _PC_SYMLINK_MAX,
4631
4632 _PC_2_SYMLINKS
4633
4634 };
4635
4636
4637 enum
4638 {
4639 _SC_ARG_MAX,
4640
4641 _SC_CHILD_MAX,
4642
4643 _SC_CLK_TCK,
4644
4645 _SC_NGROUPS_MAX,
4646
4647 _SC_OPEN_MAX,
4648
4649 _SC_STREAM_MAX,
4650
4651 _SC_TZNAME_MAX,
4652
4653 _SC_JOB_CONTROL,
4654
4655 _SC_SAVED_IDS,
4656
4657 _SC_REALTIME_SIGNALS,
4658
4659 _SC_PRIORITY_SCHEDULING,
4660
4661 _SC_TIMERS,
4662
4663 _SC_ASYNCHRONOUS_IO,
4664
4665 _SC_PRIORITIZED_IO,
4666
4667 _SC_SYNCHRONIZED_IO,
4668
4669 _SC_FSYNC,
4670
4671 _SC_MAPPED_FILES,
4672
4673 _SC_MEMLOCK,
4674
4675 _SC_MEMLOCK_RANGE,
4676
4677 _SC_MEMORY_PROTECTION,
4678
4679 _SC_MESSAGE_PASSING,
4680
4681 _SC_SEMAPHORES,
4682
4683 _SC_SHARED_MEMORY_OBJECTS,
4684
4685 _SC_AIO_LISTIO_MAX,
4686
4687 _SC_AIO_MAX,
4688
4689 _SC_AIO_PRIO_DELTA_MAX,
4690
4691 _SC_DELAYTIMER_MAX,
4692
4693 _SC_MQ_OPEN_MAX,
4694
4695 _SC_MQ_PRIO_MAX,
4696
4697 _SC_VERSION,
4698
4699 _SC_PAGESIZE,
4700
4701
4702 _SC_RTSIG_MAX,
4703
4704 _SC_SEM_NSEMS_MAX,
4705
4706 _SC_SEM_VALUE_MAX,
4707
4708 _SC_SIGQUEUE_MAX,
4709
4710 _SC_TIMER_MAX,
4711
4712
4713
4714
4715 _SC_BC_BASE_MAX,
4716
4717 _SC_BC_DIM_MAX,
4718
4719 _SC_BC_SCALE_MAX,
4720
4721 _SC_BC_STRING_MAX,
4722
4723 _SC_COLL_WEIGHTS_MAX,
4724
4725 _SC_EQUIV_CLASS_MAX,
4726
4727 _SC_EXPR_NEST_MAX,
4728
4729 _SC_LINE_MAX,
4730
4731 _SC_RE_DUP_MAX,
4732
4733 _SC_CHARCLASS_NAME_MAX,
4734
4735
4736 _SC_2_VERSION,
4737
4738 _SC_2_C_BIND,
4739
4740 _SC_2_C_DEV,
4741
4742 _SC_2_FORT_DEV,
4743
4744 _SC_2_FORT_RUN,
4745
4746 _SC_2_SW_DEV,
4747
4748 _SC_2_LOCALEDEF,
4749
4750
4751 _SC_PII,
4752
4753 _SC_PII_XTI,
4754
4755 _SC_PII_SOCKET,
4756
4757 _SC_PII_INTERNET,
4758
4759 _SC_PII_OSI,
4760
4761 _SC_POLL,
4762
4763 _SC_SELECT,
4764
4765 _SC_UIO_MAXIOV,
4766
4767 _SC_IOV_MAX = _SC_UIO_MAXIOV,
4768
4769 _SC_PII_INTERNET_STREAM,
4770
4771 _SC_PII_INTERNET_DGRAM,
4772
4773 _SC_PII_OSI_COTS,
4774
4775 _SC_PII_OSI_CLTS,
4776
4777 _SC_PII_OSI_M,
4778
4779 _SC_T_IOV_MAX,
4780
4781
4782
4783 _SC_THREADS,
4784
4785 _SC_THREAD_SAFE_FUNCTIONS,
4786
4787 _SC_GETGR_R_SIZE_MAX,
4788
4789 _SC_GETPW_R_SIZE_MAX,
4790
4791 _SC_LOGIN_NAME_MAX,
4792
4793 _SC_TTY_NAME_MAX,
4794
4795 _SC_THREAD_DESTRUCTOR_ITERATIONS,
4796
4797 _SC_THREAD_KEYS_MAX,
4798
4799 _SC_THREAD_STACK_MIN,
4800
4801 _SC_THREAD_THREADS_MAX,
4802
4803 _SC_THREAD_ATTR_STACKADDR,
4804
4805 _SC_THREAD_ATTR_STACKSIZE,
4806
4807 _SC_THREAD_PRIORITY_SCHEDULING,
4808
4809 _SC_THREAD_PRIO_INHERIT,
4810
4811 _SC_THREAD_PRIO_PROTECT,
4812
4813 _SC_THREAD_PROCESS_SHARED,
4814
4815
4816 _SC_NPROCESSORS_CONF,
4817
4818 _SC_NPROCESSORS_ONLN,
4819
4820 _SC_PHYS_PAGES,
4821
4822 _SC_AVPHYS_PAGES,
4823
4824 _SC_ATEXIT_MAX,
4825
4826 _SC_PASS_MAX,
4827
4828
4829 _SC_XOPEN_VERSION,
4830
4831 _SC_XOPEN_XCU_VERSION,
4832
4833 _SC_XOPEN_UNIX,
4834
4835 _SC_XOPEN_CRYPT,
4836
4837 _SC_XOPEN_ENH_I18N,
4838
4839 _SC_XOPEN_SHM,
4840
4841
4842 _SC_2_CHAR_TERM,
4843
4844 _SC_2_C_VERSION,
4845
4846 _SC_2_UPE,
4847
4848
4849 _SC_XOPEN_XPG2,
4850
4851 _SC_XOPEN_XPG3,
4852
4853 _SC_XOPEN_XPG4,
4854
4855
4856 _SC_CHAR_BIT,
4857
4858 _SC_CHAR_MAX,
4859
4860 _SC_CHAR_MIN,
4861
4862 _SC_INT_MAX,
4863
4864 _SC_INT_MIN,
4865
4866 _SC_LONG_BIT,
4867
4868 _SC_WORD_BIT,
4869
4870 _SC_MB_LEN_MAX,
4871
4872 _SC_NZERO,
4873
4874 _SC_SSIZE_MAX,
4875
4876 _SC_SCHAR_MAX,
4877
4878 _SC_SCHAR_MIN,
4879
4880 _SC_SHRT_MAX,
4881
4882 _SC_SHRT_MIN,
4883
4884 _SC_UCHAR_MAX,
4885
4886 _SC_UINT_MAX,
4887
4888 _SC_ULONG_MAX,
4889
4890 _SC_USHRT_MAX,
4891
4892
4893 _SC_NL_ARGMAX,
4894
4895 _SC_NL_LANGMAX,
4896
4897 _SC_NL_MSGMAX,
4898
4899 _SC_NL_NMAX,
4900
4901 _SC_NL_SETMAX,
4902
4903 _SC_NL_TEXTMAX,
4904
4905
4906 _SC_XBS5_ILP32_OFF32,
4907
4908 _SC_XBS5_ILP32_OFFBIG,
4909
4910 _SC_XBS5_LP64_OFF64,
4911
4912 _SC_XBS5_LPBIG_OFFBIG,
4913
4914
4915 _SC_XOPEN_LEGACY,
4916
4917 _SC_XOPEN_REALTIME,
4918
4919 _SC_XOPEN_REALTIME_THREADS,
4920
4921
4922 _SC_ADVISORY_INFO,
4923
4924 _SC_BARRIERS,
4925
4926 _SC_BASE,
4927
4928 _SC_C_LANG_SUPPORT,
4929
4930 _SC_C_LANG_SUPPORT_R,
4931
4932 _SC_CLOCK_SELECTION,
4933
4934 _SC_CPUTIME,
4935
4936 _SC_THREAD_CPUTIME,
4937
4938 _SC_DEVICE_IO,
4939
4940 _SC_DEVICE_SPECIFIC,
4941
4942 _SC_DEVICE_SPECIFIC_R,
4943
4944 _SC_FD_MGMT,
4945
4946 _SC_FIFO,
4947
4948 _SC_PIPE,
4949
4950 _SC_FILE_ATTRIBUTES,
4951
4952 _SC_FILE_LOCKING,
4953
4954 _SC_FILE_SYSTEM,
4955
4956 _SC_MONOTONIC_CLOCK,
4957
4958 _SC_MULTI_PROCESS,
4959
4960 _SC_SINGLE_PROCESS,
4961
4962 _SC_NETWORKING,
4963
4964 _SC_READER_WRITER_LOCKS,
4965
4966 _SC_SPIN_LOCKS,
4967
4968 _SC_REGEXP,
4969
4970 _SC_REGEX_VERSION,
4971
4972 _SC_SHELL,
4973
4974 _SC_SIGNALS,
4975
4976 _SC_SPAWN,
4977
4978 _SC_SPORADIC_SERVER,
4979
4980 _SC_THREAD_SPORADIC_SERVER,
4981
4982 _SC_SYSTEM_DATABASE,
4983
4984 _SC_SYSTEM_DATABASE_R,
4985
4986 _SC_TIMEOUTS,
4987
4988 _SC_TYPED_MEMORY_OBJECTS,
4989
4990 _SC_USER_GROUPS,
4991
4992 _SC_USER_GROUPS_R,
4993
4994 _SC_2_PBS,
4995
4996 _SC_2_PBS_ACCOUNTING,
4997
4998 _SC_2_PBS_LOCATE,
4999
5000 _SC_2_PBS_MESSAGE,
5001
5002 _SC_2_PBS_TRACK,
5003
5004 _SC_SYMLOOP_MAX,
5005
5006 _SC_STREAMS,
5007
5008 _SC_2_PBS_CHECKPOINT,
5009
5010
5011 _SC_V6_ILP32_OFF32,
5012
5013 _SC_V6_ILP32_OFFBIG,
5014
5015 _SC_V6_LP64_OFF64,
5016
5017 _SC_V6_LPBIG_OFFBIG,
5018
5019
5020 _SC_HOST_NAME_MAX,
5021
5022 _SC_TRACE,
5023
5024 _SC_TRACE_EVENT_FILTER,
5025
5026 _SC_TRACE_INHERIT,
5027
5028 _SC_TRACE_LOG,
5029
5030
5031 _SC_LEVEL1_ICACHE_SIZE,
5032
5033 _SC_LEVEL1_ICACHE_ASSOC,
5034
5035 _SC_LEVEL1_ICACHE_LINESIZE,
5036
5037 _SC_LEVEL1_DCACHE_SIZE,
5038
5039 _SC_LEVEL1_DCACHE_ASSOC,
5040
5041 _SC_LEVEL1_DCACHE_LINESIZE,
5042
5043 _SC_LEVEL2_CACHE_SIZE,
5044
5045 _SC_LEVEL2_CACHE_ASSOC,
5046
5047 _SC_LEVEL2_CACHE_LINESIZE,
5048
5049 _SC_LEVEL3_CACHE_SIZE,
5050
5051 _SC_LEVEL3_CACHE_ASSOC,
5052
5053 _SC_LEVEL3_CACHE_LINESIZE,
5054
5055 _SC_LEVEL4_CACHE_SIZE,
5056
5057 _SC_LEVEL4_CACHE_ASSOC,
5058
5059 _SC_LEVEL4_CACHE_LINESIZE,
5060
5061
5062
5063 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
5064
5065 _SC_RAW_SOCKETS,
5066
5067
5068 _SC_V7_ILP32_OFF32,
5069
5070 _SC_V7_ILP32_OFFBIG,
5071
5072 _SC_V7_LP64_OFF64,
5073
5074 _SC_V7_LPBIG_OFFBIG,
5075
5076
5077 _SC_SS_REPL_MAX,
5078
5079
5080 _SC_TRACE_EVENT_NAME_MAX,
5081
5082 _SC_TRACE_NAME_MAX,
5083
5084 _SC_TRACE_SYS_MAX,
5085
5086 _SC_TRACE_USER_EVENT_MAX,
5087
5088
5089 _SC_XOPEN_STREAMS,
5090
5091
5092 _SC_THREAD_ROBUST_PRIO_INHERIT,
5093
5094 _SC_THREAD_ROBUST_PRIO_PROTECT,
5095
5096
5097 _SC_MINSIGSTKSZ,
5098
5099
5100 _SC_SIGSTKSZ
5101
5102 };
5103
5104
5105 enum
5106 {
5107 _CS_PATH,
5108
5109
5110 _CS_V6_WIDTH_RESTRICTED_ENVS,
5111
5112
5113
5114 _CS_GNU_LIBC_VERSION,
5115
5116 _CS_GNU_LIBPTHREAD_VERSION,
5117
5118
5119 _CS_V5_WIDTH_RESTRICTED_ENVS,
5120
5121
5122
5123 _CS_V7_WIDTH_RESTRICTED_ENVS,
5124
5125
5126
5127 _CS_LFS_CFLAGS = 1000,
5128
5129 _CS_LFS_LDFLAGS,
5130
5131 _CS_LFS_LIBS,
5132
5133 _CS_LFS_LINTFLAGS,
5134
5135 _CS_LFS64_CFLAGS,
5136
5137 _CS_LFS64_LDFLAGS,
5138
5139 _CS_LFS64_LIBS,
5140
5141 _CS_LFS64_LINTFLAGS,
5142
5143
5144 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
5145
5146 _CS_XBS5_ILP32_OFF32_LDFLAGS,
5147
5148 _CS_XBS5_ILP32_OFF32_LIBS,
5149
5150 _CS_XBS5_ILP32_OFF32_LINTFLAGS,
5151
5152 _CS_XBS5_ILP32_OFFBIG_CFLAGS,
5153
5154 _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
5155
5156 _CS_XBS5_ILP32_OFFBIG_LIBS,
5157
5158 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
5159
5160 _CS_XBS5_LP64_OFF64_CFLAGS,
5161
5162 _CS_XBS5_LP64_OFF64_LDFLAGS,
5163
5164 _CS_XBS5_LP64_OFF64_LIBS,
5165
5166 _CS_XBS5_LP64_OFF64_LINTFLAGS,
5167
5168 _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
5169
5170 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
5171
5172 _CS_XBS5_LPBIG_OFFBIG_LIBS,
5173
5174 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
5175
5176
5177 _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
5178
5179 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
5180
5181 _CS_POSIX_V6_ILP32_OFF32_LIBS,
5182
5183 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
5184
5185 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
5186
5187 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
5188
5189 _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
5190
5191 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
5192
5193 _CS_POSIX_V6_LP64_OFF64_CFLAGS,
5194
5195 _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
5196
5197 _CS_POSIX_V6_LP64_OFF64_LIBS,
5198
5199 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
5200
5201 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
5202
5203 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
5204
5205 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
5206
5207 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
5208
5209
5210 _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
5211
5212 _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
5213
5214 _CS_POSIX_V7_ILP32_OFF32_LIBS,
5215
5216 _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
5217
5218 _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
5219
5220 _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
5221
5222 _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
5223
5224 _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
5225
5226 _CS_POSIX_V7_LP64_OFF64_CFLAGS,
5227
5228 _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
5229
5230 _CS_POSIX_V7_LP64_OFF64_LIBS,
5231
5232 _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
5233
5234 _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
5235
5236 _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
5237
5238 _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
5239
5240 _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
5241
5242
5243 _CS_V6_ENV,
5244
5245 _CS_V7_ENV
5246
5247 };
5248 # 631 "/usr/include/unistd.h" 2 3 4
5249
5250
5251 extern long int pathconf (const char *__path, int __name)
5252 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5253
5254
5255 extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__));
5256
5257
5258 extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__));
5259
5260
5261
5262 extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__))
5263 __attribute__ ((__access__ (__write_only__, 2)));
5264
5265
5266
5267
5268 extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__));
5269
5270
5271 extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__));
5272
5273
5274 extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
5275
5276
5277 extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
5278
5279 extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
5280
5281
5282
5283
5284
5285
5286 extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__));
5287 # 682 "/usr/include/unistd.h" 3 4
5288 extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
5289
5290
5291
5292
5293
5294
5295 extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__));
5296
5297
5298
5299 extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
5300
5301
5302
5303 extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__));
5304
5305
5306 extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__));
5307
5308
5309 extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__));
5310
5311
5312 extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__));
5313
5314
5315
5316
5317 extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
5318 __attribute__ ((__access__ (__write_only__, 2)));
5319 # 722 "/usr/include/unistd.h" 3 4
5320 extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5321
5322
5323
5324
5325 extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5326
5327
5328
5329
5330 extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5331
5332
5333
5334
5335
5336
5337 extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5338
5339
5340
5341
5342 extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5343
5344
5345
5346
5347 extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5348 # 778 "/usr/include/unistd.h" 3 4
5349 extern __pid_t fork (void) __attribute__ ((__nothrow__));
5350
5351
5352
5353
5354
5355
5356
5357 extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__));
5358 # 799 "/usr/include/unistd.h" 3 4
5359 extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__));
5360
5361
5362
5363 extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
5364 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__))
5365 __attribute__ ((__access__ (__write_only__, 2)));
5366
5367
5368
5369 extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__));
5370
5371
5372
5373
5374 extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__));
5375
5376
5377
5378
5379 extern int link (const char *__from, const char *__to)
5380 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
5381
5382
5383
5384
5385 extern int linkat (int __fromfd, const char *__from, int __tofd,
5386 const char *__to, int __flags)
5387 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__));
5388
5389
5390
5391
5392 extern int symlink (const char *__from, const char *__to)
5393 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
5394
5395
5396
5397
5398 extern ssize_t readlink (const char *__restrict __path,
5399 char *__restrict __buf, size_t __len)
5400 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__))
5401 __attribute__ ((__access__ (__write_only__, 2)));
5402
5403
5404
5405
5406
5407 extern int symlinkat (const char *__from, int __tofd,
5408 const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
5409
5410
5411 extern ssize_t readlinkat (int __fd, const char *__restrict __path,
5412 char *__restrict __buf, size_t __len)
5413 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__))
5414 __attribute__ ((__access__ (__write_only__, 3)));
5415
5416
5417
5418 extern int unlink (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5419
5420
5421
5422 extern int unlinkat (int __fd, const char *__name, int __flag)
5423 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
5424
5425
5426
5427 extern int rmdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5428
5429
5430
5431 extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__));
5432
5433
5434 extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__));
5435
5436
5437
5438
5439
5440
5441 extern char *getlogin (void);
5442
5443
5444
5445
5446
5447
5448
5449 extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)))
5450 __attribute__ ((__access__ (__write_only__, 1)));
5451
5452
5453
5454
5455 extern int setlogin (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5456
5457
5458
5459
5460
5461
5462
5463 # 1 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 1 3 4
5464 # 27 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 3 4
5465 # 1 "/usr/include/x86_64-linux-gnu/bits/getopt_core.h" 1 3 4
5466 # 28 "/usr/include/x86_64-linux-gnu/bits/getopt_core.h" 3 4
5467
5468
5469
5470
5471
5472
5473
5474
5475 extern char *optarg;
5476 # 50 "/usr/include/x86_64-linux-gnu/bits/getopt_core.h" 3 4
5477 extern int optind;
5478
5479
5480
5481
5482 extern int opterr;
5483
5484
5485
5486 extern int optopt;
5487 # 91 "/usr/include/x86_64-linux-gnu/bits/getopt_core.h" 3 4
5488 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
5489 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
5490
5491
5492 # 28 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 2 3 4
5493
5494
5495 # 49 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 3 4
5496
5497 # 904 "/usr/include/unistd.h" 2 3 4
5498
5499
5500
5501
5502
5503
5504
5505 extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
5506 __attribute__ ((__access__ (__write_only__, 1)));
5507
5508
5509
5510
5511
5512
5513 extern int sethostname (const char *__name, size_t __len)
5514 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 1, 2)));
5515
5516
5517
5518 extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5519
5520
5521
5522
5523
5524 extern int getdomainname (char *__name, size_t __len)
5525 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__))
5526 __attribute__ ((__access__ (__write_only__, 1)));
5527 extern int setdomainname (const char *__name, size_t __len)
5528 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 1, 2)));
5529
5530
5531
5532
5533 extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__));
5534
5535
5536 extern int revoke (const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
5537
5538
5539
5540
5541
5542
5543
5544 extern int profil (unsigned short int *__sample_buffer, size_t __size,
5545 size_t __offset, unsigned int __scale)
5546 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5547
5548
5549
5550
5551
5552 extern int acct (const char *__name) __attribute__ ((__nothrow__ , __leaf__));
5553
5554
5555
5556 extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__));
5557 extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__));
5558 extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__));
5559
5560
5561
5562
5563
5564 extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5565
5566
5567
5568
5569
5570
5571 extern int chroot (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
5572
5573
5574
5575 extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));
5576
5577
5578
5579
5580
5581
5582
5583 extern int fsync (int __fd);
5584 # 1002 "/usr/include/unistd.h" 3 4
5585 extern long int gethostid (void);
5586
5587
5588 extern void sync (void) __attribute__ ((__nothrow__ , __leaf__));
5589
5590
5591
5592
5593
5594 extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5595
5596
5597
5598
5599 extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__));
5600 # 1026 "/usr/include/unistd.h" 3 4
5601 extern int truncate (const char *__file, __off_t __length)
5602 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
5603 # 1049 "/usr/include/unistd.h" 3 4
5604 extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5605 # 1070 "/usr/include/unistd.h" 3 4
5606 extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5607
5608
5609
5610
5611
5612 extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__));
5613 # 1091 "/usr/include/unistd.h" 3 4
5614 extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__));
5615 # 1114 "/usr/include/unistd.h" 3 4
5616 extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__));
5617 # 1150 "/usr/include/unistd.h" 3 4
5618 extern int fdatasync (int __fildes);
5619 # 1162 "/usr/include/unistd.h" 3 4
5620 extern char *crypt (const char *__key, const char *__salt)
5621 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
5622 # 1201 "/usr/include/unistd.h" 3 4
5623 int getentropy (void *__buffer, size_t __length) __attribute__ ((__warn_unused_result__))
5624 __attribute__ ((__access__ (__write_only__, 1, 2)));
5625 # 1217 "/usr/include/unistd.h" 3 4
5626 # 1 "/usr/include/x86_64-linux-gnu/bits/unistd.h" 1 3 4
5627 # 23 "/usr/include/x86_64-linux-gnu/bits/unistd.h" 3 4
5628 # 1 "/usr/include/x86_64-linux-gnu/bits/unistd-decl.h" 1 3 4
5629 # 26 "/usr/include/x86_64-linux-gnu/bits/unistd-decl.h" 3 4
5630 extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
5631 size_t __buflen)
5632 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5633 extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read")
5634
5635 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5636 extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk")
5637
5638
5639 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer")))
5640 ;
5641
5642
5643 extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
5644 __off_t __offset, size_t __bufsize)
5645 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5646 extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
5647 __off64_t __offset, size_t __bufsize)
5648 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5649 extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread")
5650
5651
5652 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5653 extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64")
5654
5655
5656 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5657 extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk")
5658
5659
5660 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer")))
5661 ;
5662 extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk")
5663
5664
5665
5666 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer")))
5667 ;
5668
5669
5670
5671 extern ssize_t __readlink_chk (const char *__restrict __path,
5672 char *__restrict __buf, size_t __len,
5673 size_t __buflen)
5674 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5675 extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__ , __leaf__))
5676
5677
5678 __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5679 extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__ , __leaf__))
5680
5681
5682
5683 __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer")))
5684 ;
5685
5686
5687
5688 extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path,
5689 char *__restrict __buf, size_t __len,
5690 size_t __buflen)
5691 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4)));
5692 extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__ , __leaf__))
5693
5694
5695
5696 __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4)));
5697 extern ssize_t __readlinkat_chk_warn (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__ , __leaf__))
5698
5699
5700
5701 __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer")))
5702
5703 ;
5704
5705
5706 extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
5707 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5708 extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__ , __leaf__))
5709 __attribute__ ((__warn_unused_result__));
5710 extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__ , __leaf__))
5711
5712
5713 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer")))
5714 ;
5715
5716
5717 extern char *__getwd_chk (char *__buf, size_t buflen)
5718 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
5719 extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__ , __leaf__))
5720 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size")))
5721 ;
5722
5723
5724 extern size_t __confstr_chk (int __name, char *__buf, size_t __len,
5725 size_t __buflen) __attribute__ ((__nothrow__ , __leaf__))
5726 __attribute__ ((__access__ (__write_only__, 2, 3)));
5727 extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__ , __leaf__))
5728
5729 __attribute__ ((__access__ (__write_only__, 2, 3)));
5730 extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__ , __leaf__))
5731
5732
5733 __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer")))
5734 ;
5735
5736
5737 extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)
5738 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 1)));
5739 extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__ , __leaf__))
5740 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 1)));
5741 extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__ , __leaf__))
5742
5743
5744 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer")))
5745 ;
5746
5747
5748 extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,
5749 size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)))
5750 __attribute__ ((__access__ (__write_only__, 2, 3)));
5751 extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__ , __leaf__))
5752
5753 __attribute__ ((__nonnull__ (2)));
5754 extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
5755
5756
5757 __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer")))
5758 ;
5759
5760
5761
5762 extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
5763 __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
5764 extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r")
5765 __attribute__ ((__nonnull__ (1)));
5766 extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk")
5767
5768
5769 __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer")))
5770 ;
5771
5772
5773
5774
5775 extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)
5776 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
5777 extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__ , __leaf__))
5778
5779 __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
5780 extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__ , __leaf__))
5781
5782
5783 __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer")))
5784 ;
5785
5786
5787
5788
5789 extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)
5790 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
5791 extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__ , __leaf__))
5792
5793 __attribute__ ((__nonnull__ (1)))
5794 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
5795 extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__ , __leaf__))
5796
5797
5798 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer")))
5799
5800 ;
5801 # 24 "/usr/include/x86_64-linux-gnu/bits/unistd.h" 2 3 4
5802
5803 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
5804 read (int __fd, void *__buf, size_t __nbytes)
5805 {
5806 return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 0)) && (__builtin_dynamic_object_size (__buf, 0)) == (long unsigned int) -1) || (((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= ((__builtin_dynamic_object_size (__buf, 0))) / ((sizeof (char))))) && (((long unsigned int) (__nbytes)) <= ((__builtin_dynamic_object_size (__buf, 0))) / ((sizeof (char)))))) ? __read_alias (__fd, __buf, __nbytes) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_dynamic_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_dynamic_object_size (__buf, 0)) / (sizeof (char)))) ? __read_chk_warn (__fd, __buf, __nbytes, __builtin_dynamic_object_size (__buf, 0)) : __read_chk (__fd, __buf, __nbytes, __builtin_dynamic_object_size (__buf, 0))))
5807
5808 ;
5809 }
5810
5811
5812
5813 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
5814 pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
5815 {
5816 return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 0)) && (__builtin_dynamic_object_size (__buf, 0)) == (long unsigned int) -1) || (((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= ((__builtin_dynamic_object_size (__buf, 0))) / ((sizeof (char))))) && (((long unsigned int) (__nbytes)) <= ((__builtin_dynamic_object_size (__buf, 0))) / ((sizeof (char)))))) ? __pread_alias (__fd, __buf, __nbytes, __offset) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_dynamic_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_dynamic_object_size (__buf, 0)) / (sizeof (char)))) ? __pread_chk_warn (__fd, __buf, __nbytes, __offset, __builtin_dynamic_object_size (__buf, 0)) : __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_dynamic_object_size (__buf, 0))))
5817
5818 ;
5819 }
5820 # 64 "/usr/include/x86_64-linux-gnu/bits/unistd.h" 3 4
5821 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t
5822 __attribute__ ((__nothrow__ , __leaf__)) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len)
5823
5824 {
5825 return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __readlink_alias (__path, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __readlink_chk_warn (__path, __buf, __len, __builtin_dynamic_object_size (__buf, 1)) : __readlink_chk (__path, __buf, __len, __builtin_dynamic_object_size (__buf, 1))))
5826
5827 ;
5828 }
5829
5830
5831
5832 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t
5833 __attribute__ ((__nothrow__ , __leaf__)) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len)
5834
5835 {
5836 return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __readlinkat_alias (__fd, __path, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __readlinkat_chk_warn (__fd, __path, __buf, __len, __builtin_dynamic_object_size (__buf, 1)) : __readlinkat_chk (__fd, __path, __buf, __len, __builtin_dynamic_object_size (__buf, 1))))
5837
5838 ;
5839 }
5840
5841
5842 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
5843 __attribute__ ((__nothrow__ , __leaf__)) getcwd (char *__buf, size_t __size)
5844 {
5845 return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__size)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __getcwd_alias (__buf, __size) : ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__size)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __getcwd_chk_warn (__buf, __size, __builtin_dynamic_object_size (__buf, 1)) : __getcwd_chk (__buf, __size, __builtin_dynamic_object_size (__buf, 1))))
5846
5847 ;
5848 }
5849
5850
5851 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char *
5852 __attribute__ ((__nothrow__ , __leaf__)) getwd (char *__buf)
5853 {
5854 if (__builtin_dynamic_object_size (__buf, 1) != (size_t) -1)
5855 return __getwd_chk (__buf, __builtin_dynamic_object_size (__buf, 1));
5856 return __getwd_warn (__buf);
5857 }
5858
5859
5860 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
5861 __attribute__ ((__nothrow__ , __leaf__)) confstr (int __name, char *__buf, size_t __len)
5862 {
5863 return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __confstr_alias (__name, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __confstr_chk_warn (__name, __buf, __len, __builtin_dynamic_object_size (__buf, 1)) : __confstr_chk (__name, __buf, __len, __builtin_dynamic_object_size (__buf, 1))))
5864
5865 ;
5866 }
5867
5868
5869 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
5870 __attribute__ ((__nothrow__ , __leaf__)) getgroups (int __size, __gid_t __list[])
5871 {
5872 return (((__builtin_constant_p (__builtin_dynamic_object_size (__list, 1)) && (__builtin_dynamic_object_size (__list, 1)) == (long unsigned int) -1) || (((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= ((__builtin_dynamic_object_size (__list, 1))) / ((sizeof (__gid_t))))) && (((long unsigned int) (__size)) <= ((__builtin_dynamic_object_size (__list, 1))) / ((sizeof (__gid_t)))))) ? __getgroups_alias (__size, __list) : ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_dynamic_object_size (__list, 1)) / (sizeof (__gid_t)))) && !(((long unsigned int) (__size)) <= (__builtin_dynamic_object_size (__list, 1)) / (sizeof (__gid_t)))) ? __getgroups_chk_warn (__size, __list, __builtin_dynamic_object_size (__list, 1)) : __getgroups_chk (__size, __list, __builtin_dynamic_object_size (__list, 1))))
5873
5874 ;
5875 }
5876
5877
5878 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
5879 __attribute__ ((__nothrow__ , __leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen)
5880 {
5881 return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __ttyname_r_alias (__fd, __buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_dynamic_object_size (__buf, 1)) : __ttyname_r_chk (__fd, __buf, __buflen, __builtin_dynamic_object_size (__buf, 1))))
5882
5883 ;
5884 }
5885
5886
5887
5888 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
5889 getlogin_r (char *__buf, size_t __buflen)
5890 {
5891 return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __getlogin_r_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __getlogin_r_chk_warn (__buf, __buflen, __builtin_dynamic_object_size (__buf, 1)) : __getlogin_r_chk (__buf, __buflen, __builtin_dynamic_object_size (__buf, 1))))
5892
5893 ;
5894 }
5895
5896
5897
5898
5899 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
5900 __attribute__ ((__nothrow__ , __leaf__)) gethostname (char *__buf, size_t __buflen)
5901 {
5902 return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __gethostname_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __gethostname_chk_warn (__buf, __buflen, __builtin_dynamic_object_size (__buf, 1)) : __gethostname_chk (__buf, __buflen, __builtin_dynamic_object_size (__buf, 1))))
5903
5904 ;
5905 }
5906
5907
5908
5909
5910 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
5911 __attribute__ ((__nothrow__ , __leaf__)) getdomainname (char *__buf, size_t __buflen)
5912 {
5913 return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __getdomainname_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __getdomainname_chk_warn (__buf, __buflen, __builtin_dynamic_object_size (__buf, 1)) : __getdomainname_chk (__buf, __buflen, __builtin_dynamic_object_size (__buf, 1))))
5914
5915 ;
5916 }
5917 # 1218 "/usr/include/unistd.h" 2 3 4
5918
5919
5920
5921 # 1 "/usr/include/x86_64-linux-gnu/bits/unistd_ext.h" 1 3 4
5922 # 1222 "/usr/include/unistd.h" 2 3 4
5923
5924
5925 # 237 "include/internal/e_os.h" 2
5926 # 264 "include/internal/e_os.h"
5927 # 1 "/usr/include/strings.h" 1 3 4
5928 # 23 "/usr/include/strings.h" 3 4
5929 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
5930 # 24 "/usr/include/strings.h" 2 3 4
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941 extern int bcmp (const void *__s1, const void *__s2, size_t __n)
5942 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
5943
5944
5945 extern void bcopy (const void *__src, void *__dest, size_t __n)
5946 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
5947
5948
5949 extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5950 # 68 "/usr/include/strings.h" 3 4
5951 extern char *index (const char *__s, int __c)
5952 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
5953 # 96 "/usr/include/strings.h" 3 4
5954 extern char *rindex (const char *__s, int __c)
5955 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
5956
5957
5958
5959
5960
5961
5962 extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5963
5964
5965
5966
5967
5968 extern int ffsl (long int __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5969 __extension__ extern int ffsll (long long int __ll)
5970 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5971
5972
5973
5974 extern int strcasecmp (const char *__s1, const char *__s2)
5975 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
5976
5977
5978 extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
5979 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
5980
5981
5982
5983
5984
5985
5986 extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc)
5987 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
5988
5989
5990
5991 extern int strncasecmp_l (const char *__s1, const char *__s2,
5992 size_t __n, locale_t __loc)
5993 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
5994
5995
5996
5997
5998
5999
6000
6001
6002 # 1 "/usr/include/x86_64-linux-gnu/bits/strings_fortified.h" 1 3 4
6003 # 22 "/usr/include/x86_64-linux-gnu/bits/strings_fortified.h" 3 4
6004 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
6005 __attribute__ ((__nothrow__ , __leaf__)) bcopy (const void *__src, void *__dest, size_t __len)
6006 {
6007 (void) __builtin___memmove_chk (__dest, __src, __len,
6008 __builtin_dynamic_object_size (__dest, 0));
6009 }
6010
6011 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
6012 __attribute__ ((__nothrow__ , __leaf__)) bzero (void *__dest, size_t __len)
6013 {
6014 (void) __builtin___memset_chk (__dest, '\0', __len,
6015 __builtin_dynamic_object_size (__dest, 0));
6016 }
6017 # 145 "/usr/include/strings.h" 2 3 4
6018 # 265 "include/internal/e_os.h" 2
6019 # 16 "ssl/ssl_local.h" 2
6020
6021
6022 # 1 "/usr/include/errno.h" 1 3 4
6023 # 28 "/usr/include/errno.h" 3 4
6024 # 1 "/usr/include/x86_64-linux-gnu/bits/errno.h" 1 3 4
6025 # 26 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4
6026 # 1 "/usr/include/linux/errno.h" 1 3 4
6027 # 1 "/usr/include/x86_64-linux-gnu/asm/errno.h" 1 3 4
6028 # 1 "/usr/include/asm-generic/errno.h" 1 3 4
6029
6030
6031
6032
6033 # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4
6034 # 6 "/usr/include/asm-generic/errno.h" 2 3 4
6035 # 2 "/usr/include/x86_64-linux-gnu/asm/errno.h" 2 3 4
6036 # 2 "/usr/include/linux/errno.h" 2 3 4
6037 # 27 "/usr/include/x86_64-linux-gnu/bits/errno.h" 2 3 4
6038 # 29 "/usr/include/errno.h" 2 3 4
6039
6040
6041
6042
6043
6044
6045
6046
6047 extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
6048 # 52 "/usr/include/errno.h" 3 4
6049
6050 # 19 "ssl/ssl_local.h" 2
6051 # 1 "include/internal/common.h" 1
6052 # 12 "include/internal/common.h"
6053
6054
6055
6056 # 1 "/usr/include/string.h" 1 3 4
6057 # 26 "/usr/include/string.h" 3 4
6058 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4
6059 # 27 "/usr/include/string.h" 2 3 4
6060
6061
6062
6063
6064
6065
6066 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
6067 # 34 "/usr/include/string.h" 2 3 4
6068 # 43 "/usr/include/string.h" 3 4
6069 extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
6070 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6071
6072
6073 extern void *memmove (void *__dest, const void *__src, size_t __n)
6074 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6075
6076
6077
6078
6079
6080 extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
6081 int __c, size_t __n)
6082 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__write_only__, 1, 4)));
6083
6084
6085
6086
6087 extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
6088
6089
6090 extern int memcmp (const void *__s1, const void *__s2, size_t __n)
6091 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
6092 # 80 "/usr/include/string.h" 3 4
6093 extern int __memcmpeq (const void *__s1, const void *__s2, size_t __n)
6094 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
6095 # 107 "/usr/include/string.h" 3 4
6096 extern void *memchr (const void *__s, int __c, size_t __n)
6097 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
6098 # 141 "/usr/include/string.h" 3 4
6099 extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
6100 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6101
6102 extern char *strncpy (char *__restrict __dest,
6103 const char *__restrict __src, size_t __n)
6104 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6105
6106
6107 extern char *strcat (char *__restrict __dest, const char *__restrict __src)
6108 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6109
6110 extern char *strncat (char *__restrict __dest, const char *__restrict __src,
6111 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6112
6113
6114 extern int strcmp (const char *__s1, const char *__s2)
6115 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
6116
6117 extern int strncmp (const char *__s1, const char *__s2, size_t __n)
6118 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
6119
6120
6121 extern int strcoll (const char *__s1, const char *__s2)
6122 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
6123
6124 extern size_t strxfrm (char *__restrict __dest,
6125 const char *__restrict __src, size_t __n)
6126 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 1, 3)));
6127
6128
6129
6130
6131
6132
6133 extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l)
6134 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
6135
6136
6137 extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
6138 locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)))
6139 __attribute__ ((__access__ (__write_only__, 1, 3)));
6140
6141
6142
6143
6144
6145 extern char *strdup (const char *__s)
6146 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
6147
6148
6149
6150
6151
6152
6153 extern char *strndup (const char *__string, size_t __n)
6154 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
6155 # 246 "/usr/include/string.h" 3 4
6156 extern char *strchr (const char *__s, int __c)
6157 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
6158 # 273 "/usr/include/string.h" 3 4
6159 extern char *strrchr (const char *__s, int __c)
6160 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
6161 # 286 "/usr/include/string.h" 3 4
6162 extern char *strchrnul (const char *__s, int __c)
6163 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
6164
6165
6166
6167
6168
6169 extern size_t strcspn (const char *__s, const char *__reject)
6170 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
6171
6172
6173 extern size_t strspn (const char *__s, const char *__accept)
6174 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
6175 # 323 "/usr/include/string.h" 3 4
6176 extern char *strpbrk (const char *__s, const char *__accept)
6177 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
6178 # 350 "/usr/include/string.h" 3 4
6179 extern char *strstr (const char *__haystack, const char *__needle)
6180 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
6181
6182
6183
6184
6185 extern char *strtok (char *__restrict __s, const char *__restrict __delim)
6186 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
6187
6188
6189
6190 extern char *__strtok_r (char *__restrict __s,
6191 const char *__restrict __delim,
6192 char **__restrict __save_ptr)
6193 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
6194
6195 extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
6196 char **__restrict __save_ptr)
6197 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
6198 # 380 "/usr/include/string.h" 3 4
6199 extern char *strcasestr (const char *__haystack, const char *__needle)
6200 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
6201
6202
6203
6204
6205
6206
6207
6208 extern void *memmem (const void *__haystack, size_t __haystacklen,
6209 const void *__needle, size_t __needlelen)
6210 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)))
6211 __attribute__ ((__access__ (__read_only__, 1, 2)))
6212 __attribute__ ((__access__ (__read_only__, 3, 4)));
6213
6214
6215
6216 extern void *__mempcpy (void *__restrict __dest,
6217 const void *__restrict __src, size_t __n)
6218 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6219 extern void *mempcpy (void *__restrict __dest,
6220 const void *__restrict __src, size_t __n)
6221 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6222
6223
6224
6225
6226 extern size_t strlen (const char *__s)
6227 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
6228
6229
6230
6231
6232 extern size_t strnlen (const char *__string, size_t __maxlen)
6233 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
6234
6235
6236
6237
6238 extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__));
6239 # 432 "/usr/include/string.h" 3 4
6240 extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__ , __leaf__))
6241
6242 __attribute__ ((__nonnull__ (2)))
6243 __attribute__ ((__access__ (__write_only__, 2, 3)));
6244 # 458 "/usr/include/string.h" 3 4
6245 extern char *strerror_l (int __errnum, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
6246
6247
6248
6249
6250
6251
6252
6253 extern void explicit_bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
6254 __attribute__ ((__access__ (__write_only__, 1)));
6255
6256
6257
6258 extern char *strsep (char **__restrict __stringp,
6259 const char *__restrict __delim)
6260 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6261
6262
6263
6264
6265 extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
6266 # 489 "/usr/include/string.h" 3 4
6267 extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
6268 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6269 extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)
6270 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6271
6272
6273
6274 extern char *__stpncpy (char *__restrict __dest,
6275 const char *__restrict __src, size_t __n)
6276 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6277 extern char *stpncpy (char *__restrict __dest,
6278 const char *__restrict __src, size_t __n)
6279 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6280
6281
6282
6283
6284 extern size_t strlcpy (char *__restrict __dest,
6285 const char *__restrict __src, size_t __n)
6286 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__write_only__, 1, 3)));
6287
6288
6289
6290 extern size_t strlcat (char *__restrict __dest,
6291 const char *__restrict __src, size_t __n)
6292 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__read_write__, 1, 3)));
6293 # 548 "/usr/include/string.h" 3 4
6294 # 1 "/usr/include/x86_64-linux-gnu/bits/string_fortified.h" 1 3 4
6295 # 25 "/usr/include/x86_64-linux-gnu/bits/string_fortified.h" 3 4
6296 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
6297 __attribute__ ((__nothrow__ , __leaf__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
6298
6299 {
6300 return __builtin___memcpy_chk (__dest, __src, __len,
6301 __builtin_dynamic_object_size (__dest, 0));
6302 }
6303
6304 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
6305 __attribute__ ((__nothrow__ , __leaf__)) memmove (void *__dest, const void *__src, size_t __len)
6306 {
6307 return __builtin___memmove_chk (__dest, __src, __len,
6308 __builtin_dynamic_object_size (__dest, 0));
6309 }
6310 # 56 "/usr/include/x86_64-linux-gnu/bits/string_fortified.h" 3 4
6311 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
6312 __attribute__ ((__nothrow__ , __leaf__)) memset (void *__dest, int __ch, size_t __len)
6313 {
6314 return __builtin___memset_chk (__dest, __ch, __len,
6315 __builtin_dynamic_object_size (__dest, 0));
6316 }
6317
6318
6319
6320
6321 void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
6322 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1)));
6323
6324 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
6325 __attribute__ ((__nothrow__ , __leaf__)) explicit_bzero (void *__dest, size_t __len)
6326 {
6327 __explicit_bzero_chk (__dest, __len, __builtin_dynamic_object_size (__dest, 0));
6328 }
6329
6330
6331 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
6332 __attribute__ ((__nothrow__ , __leaf__)) strcpy (char *__restrict __dest, const char *__restrict __src)
6333 {
6334 return __builtin___strcpy_chk (__dest, __src, __builtin_dynamic_object_size (__dest, 1));
6335 }
6336
6337
6338 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
6339 __attribute__ ((__nothrow__ , __leaf__)) stpcpy (char *__restrict __dest, const char *__restrict __src)
6340 {
6341 return __builtin___stpcpy_chk (__dest, __src, __builtin_dynamic_object_size (__dest, 1));
6342 }
6343
6344
6345
6346 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
6347 __attribute__ ((__nothrow__ , __leaf__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len)
6348
6349 {
6350 return __builtin___strncpy_chk (__dest, __src, __len,
6351 __builtin_dynamic_object_size (__dest, 1));
6352 }
6353
6354
6355
6356 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
6357 __attribute__ ((__nothrow__ , __leaf__)) stpncpy (char *__dest, const char *__src, size_t __n)
6358 {
6359 return __builtin___stpncpy_chk (__dest, __src, __n,
6360 __builtin_dynamic_object_size (__dest, 1));
6361 }
6362 # 127 "/usr/include/x86_64-linux-gnu/bits/string_fortified.h" 3 4
6363 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
6364 __attribute__ ((__nothrow__ , __leaf__)) strcat (char *__restrict __dest, const char *__restrict __src)
6365 {
6366 return __builtin___strcat_chk (__dest, __src, __builtin_dynamic_object_size (__dest, 1));
6367 }
6368
6369
6370 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
6371 __attribute__ ((__nothrow__ , __leaf__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len)
6372
6373 {
6374 return __builtin___strncat_chk (__dest, __src, __len,
6375 __builtin_dynamic_object_size (__dest, 1));
6376 }
6377
6378
6379 extern size_t __strlcpy_chk (char *__dest, const char *__src, size_t __n,
6380 size_t __destlen) __attribute__ ((__nothrow__ , __leaf__));
6381 extern size_t __strlcpy_alias (char *__dest, const char *__src, size_t __n) __asm__ ("" "strlcpy") __attribute__ ((__nothrow__ , __leaf__))
6382
6383 ;
6384
6385 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
6386 __attribute__ ((__nothrow__ , __leaf__)) strlcpy (char *__restrict __dest, const char *__restrict __src, size_t __n)
6387
6388 {
6389 if (__builtin_dynamic_object_size (__dest, 1) != (size_t) -1
6390 && (!__builtin_constant_p (__n > __builtin_dynamic_object_size (__dest, 1))
6391 || __n > __builtin_dynamic_object_size (__dest, 1)))
6392 return __strlcpy_chk (__dest, __src, __n, __builtin_dynamic_object_size (__dest, 1));
6393 return __strlcpy_alias (__dest, __src, __n);
6394 }
6395
6396 extern size_t __strlcat_chk (char *__dest, const char *__src, size_t __n,
6397 size_t __destlen) __attribute__ ((__nothrow__ , __leaf__));
6398 extern size_t __strlcat_alias (char *__dest, const char *__src, size_t __n) __asm__ ("" "strlcat") __attribute__ ((__nothrow__ , __leaf__))
6399
6400 ;
6401
6402 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
6403 __attribute__ ((__nothrow__ , __leaf__)) strlcat (char *__restrict __dest, const char *__restrict __src, size_t __n)
6404
6405 {
6406 if (__builtin_dynamic_object_size (__dest, 1) != (size_t) -1
6407 && (!__builtin_constant_p (__n > __builtin_dynamic_object_size (__dest, 1))
6408 || __n > __builtin_dynamic_object_size (__dest, 1)))
6409 return __strlcat_chk (__dest, __src, __n, __builtin_dynamic_object_size (__dest, 1));
6410 return __strlcat_alias (__dest, __src, __n);
6411 }
6412 # 549 "/usr/include/string.h" 2 3 4
6413
6414
6415
6416
6417 # 16 "include/internal/common.h" 2
6418
6419
6420
6421 # 1 "include/internal/nelem.h" 1
6422 # 12 "include/internal/nelem.h"
6423
6424 # 20 "include/internal/common.h" 2
6425 # 187 "include/internal/common.h"
6426
6427 # 187 "include/internal/common.h"
6428 static inline int ossl_ends_with_dirsep(const char *path)
6429 {
6430 if (*path != '\0')
6431 path += strlen(path) - 1;
6432
6433
6434
6435
6436
6437
6438
6439 return *path == '/';
6440 }
6441
6442 static inline char ossl_determine_dirsep(const char *path)
6443 {
6444 if (ossl_ends_with_dirsep(path))
6445 return '\0';
6446
6447
6448
6449
6450
6451
6452 return '/';
6453
6454 }
6455
6456 static inline int ossl_is_absolute_path(const char *path)
6457 {
6458 # 228 "include/internal/common.h"
6459 return path[0] == '/';
6460 }
6461 # 20 "ssl/ssl_local.h" 2
6462
6463 # 1 "include/openssl/buffer.h" 1
6464 # 12 "include/openssl/buffer.h"
6465
6466
6467
6468
6469
6470
6471
6472 # 1 "include/openssl/types.h" 1
6473 # 20 "include/openssl/buffer.h" 2
6474
6475
6476
6477 # 1 "include/openssl/buffererr.h" 1
6478 # 13 "include/openssl/buffererr.h"
6479
6480 # 24 "include/openssl/buffer.h" 2
6481
6482
6483
6484
6485
6486
6487 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
6488 # 31 "include/openssl/buffer.h" 2
6489 # 42 "include/openssl/buffer.h"
6490 struct buf_mem_st {
6491 size_t length;
6492 char *data;
6493 size_t max;
6494 unsigned long flags;
6495 };
6496
6497
6498
6499 BUF_MEM *BUF_MEM_new(void);
6500 BUF_MEM *BUF_MEM_new_ex(unsigned long flags);
6501 void BUF_MEM_free(BUF_MEM *a);
6502 size_t BUF_MEM_grow(BUF_MEM *str, size_t len);
6503 size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
6504 void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
6505 # 22 "ssl/ssl_local.h" 2
6506 # 1 "include/openssl/bio.h" 1
6507 # 16 "include/openssl/bio.h"
6508
6509 # 28 "include/openssl/bio.h"
6510 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdarg.h" 1 3 4
6511 # 29 "include/openssl/bio.h" 2
6512
6513
6514 # 1 "include/openssl/bioerr.h" 1
6515 # 13 "include/openssl/bioerr.h"
6516
6517 # 32 "include/openssl/bio.h" 2
6518 # 242 "include/openssl/bio.h"
6519 typedef union bio_addr_st BIO_ADDR;
6520 typedef struct bio_addrinfo_st BIO_ADDRINFO;
6521
6522 int BIO_get_new_index(void);
6523 void BIO_set_flags(BIO *b, int flags);
6524 int BIO_test_flags(const BIO *b, int flags);
6525 void BIO_clear_flags(BIO *b, int flags);
6526 # 307 "include/openssl/bio.h"
6527 typedef long (*BIO_callback_fn)(BIO *b, int oper, const char *argp, int argi,
6528 long argl, long ret);
6529 __attribute__((deprecated("Since OpenSSL " "3.0"))) BIO_callback_fn BIO_get_callback(const BIO *b);
6530 __attribute__((deprecated("Since OpenSSL " "3.0"))) void BIO_set_callback(BIO *b, BIO_callback_fn callback);
6531 __attribute__((deprecated("Since OpenSSL " "3.0"))) long BIO_debug_callback(BIO *bio, int cmd,
6532 const char *argp, int argi,
6533 long argl, long ret);
6534
6535
6536 typedef long (*BIO_callback_fn_ex)(BIO *b, int oper, const char *argp,
6537 size_t len, int argi,
6538 long argl, int ret, size_t *processed);
6539 BIO_callback_fn_ex BIO_get_callback_ex(const BIO *b);
6540 void BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex callback);
6541 long BIO_debug_callback_ex(BIO *bio, int oper, const char *argp, size_t len,
6542 int argi, long argl, int ret, size_t *processed);
6543
6544 char *BIO_get_callback_arg(const BIO *b);
6545 void BIO_set_callback_arg(BIO *b, char *arg);
6546
6547 typedef struct bio_method_st BIO_METHOD;
6548
6549 const char *BIO_method_name(const BIO *b);
6550 int BIO_method_type(const BIO *b);
6551
6552 typedef int BIO_info_cb(BIO *, int, int);
6553 typedef BIO_info_cb bio_info_cb;
6554
6555 struct stack_st_BIO; typedef int (*sk_BIO_compfunc)(const BIO * const *a, const BIO *const *b); typedef void (*sk_BIO_freefunc)(BIO *a); typedef BIO * (*sk_BIO_copyfunc)(const BIO *a); static __attribute__((unused)) inline BIO *ossl_check_BIO_type(BIO *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_BIO_sk_type(const struct stack_st_BIO *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_BIO_sk_type(struct stack_st_BIO *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_BIO_compfunc_type(sk_BIO_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_BIO_copyfunc_type(sk_BIO_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_BIO_freefunc_type(sk_BIO_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
6556 # 365 "include/openssl/bio.h"
6557 typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
6558 void *parg);
6559
6560 typedef void (*BIO_dgram_sctp_notification_handler_fn) (BIO *b,
6561 void *context,
6562 void *buf);
6563 # 397 "include/openssl/bio.h"
6564 typedef struct bio_msg_st {
6565 void *data;
6566 size_t data_len;
6567 BIO_ADDR *peer, *local;
6568 uint64_t flags;
6569 } BIO_MSG;
6570
6571 typedef struct bio_mmsg_cb_args_st {
6572 BIO_MSG *msg;
6573 size_t stride, num_msg;
6574 uint64_t flags;
6575 size_t *msgs_processed;
6576 } BIO_MMSG_CB_ARGS;
6577
6578
6579
6580
6581
6582
6583 typedef struct bio_poll_descriptor_st {
6584 uint32_t type;
6585 union {
6586 int fd;
6587 void *custom;
6588 uintptr_t custom_ui;
6589 SSL *ssl;
6590 } value;
6591 } BIO_POLL_DESCRIPTOR;
6592 # 635 "include/openssl/bio.h"
6593 size_t BIO_ctrl_pending(BIO *b);
6594 size_t BIO_ctrl_wpending(BIO *b);
6595 # 655 "include/openssl/bio.h"
6596 size_t BIO_ctrl_get_write_guarantee(BIO *b);
6597 size_t BIO_ctrl_get_read_request(BIO *b);
6598 int BIO_ctrl_reset_read_request(BIO *b);
6599 # 704 "include/openssl/bio.h"
6600 int BIO_set_ex_data(BIO *bio, int idx, void *data);
6601 void *BIO_get_ex_data(const BIO *bio, int idx);
6602 uint64_t BIO_number_read(BIO *bio);
6603 uint64_t BIO_number_written(BIO *bio);
6604
6605
6606 int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
6607 asn1_ps_func *prefix_free);
6608 int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
6609 asn1_ps_func **pprefix_free);
6610 int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
6611 asn1_ps_func *suffix_free);
6612 int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
6613 asn1_ps_func **psuffix_free);
6614
6615 const BIO_METHOD *BIO_s_file(void);
6616 BIO *BIO_new_file(const char *filename, const char *mode);
6617 BIO *BIO_new_from_core_bio(OSSL_LIB_CTX *libctx, OSSL_CORE_BIO *corebio);
6618
6619 BIO *BIO_new_fp(FILE *stream, int close_flag);
6620
6621 BIO *BIO_new_ex(OSSL_LIB_CTX *libctx, const BIO_METHOD *method);
6622 BIO *BIO_new(const BIO_METHOD *type);
6623 int BIO_free(BIO *a);
6624 void BIO_set_data(BIO *a, void *ptr);
6625 void *BIO_get_data(BIO *a);
6626 void BIO_set_init(BIO *a, int init);
6627 int BIO_get_init(BIO *a);
6628 void BIO_set_shutdown(BIO *a, int shut);
6629 int BIO_get_shutdown(BIO *a);
6630 void BIO_vfree(BIO *a);
6631 int BIO_up_ref(BIO *a);
6632 int BIO_read(BIO *b, void *data, int dlen);
6633 int BIO_read_ex(BIO *b, void *data, size_t dlen, size_t *readbytes);
6634 int BIO_recvmmsg(BIO *b, BIO_MSG *msg,
6635 size_t stride, size_t num_msg, uint64_t flags,
6636 size_t *msgs_processed);
6637 int BIO_gets(BIO *bp, char *buf, int size);
6638 int BIO_get_line(BIO *bio, char *buf, int size);
6639 int BIO_write(BIO *b, const void *data, int dlen);
6640 int BIO_write_ex(BIO *b, const void *data, size_t dlen, size_t *written);
6641 int BIO_sendmmsg(BIO *b, BIO_MSG *msg,
6642 size_t stride, size_t num_msg, uint64_t flags,
6643 size_t *msgs_processed);
6644 int BIO_get_rpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
6645 int BIO_get_wpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
6646 int BIO_puts(BIO *bp, const char *buf);
6647 int BIO_indent(BIO *b, int indent, int max);
6648 long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
6649 long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
6650 void *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
6651 long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
6652 BIO *BIO_push(BIO *b, BIO *append);
6653 BIO *BIO_pop(BIO *b);
6654 void BIO_free_all(BIO *a);
6655 BIO *BIO_find_type(BIO *b, int bio_type);
6656 BIO *BIO_next(BIO *b);
6657 void BIO_set_next(BIO *b, BIO *next);
6658 BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
6659 int BIO_get_retry_reason(BIO *bio);
6660 void BIO_set_retry_reason(BIO *bio, int reason);
6661 BIO *BIO_dup_chain(BIO *in);
6662
6663 int BIO_nread0(BIO *bio, char **buf);
6664 int BIO_nread(BIO *bio, char **buf, int num);
6665 int BIO_nwrite0(BIO *bio, char **buf);
6666 int BIO_nwrite(BIO *bio, char **buf, int num);
6667
6668 const BIO_METHOD *BIO_s_mem(void);
6669
6670 const BIO_METHOD *BIO_s_dgram_mem(void);
6671
6672 const BIO_METHOD *BIO_s_secmem(void);
6673 BIO *BIO_new_mem_buf(const void *buf, int len);
6674
6675 const BIO_METHOD *BIO_s_socket(void);
6676 const BIO_METHOD *BIO_s_connect(void);
6677 const BIO_METHOD *BIO_s_accept(void);
6678
6679 const BIO_METHOD *BIO_s_fd(void);
6680 const BIO_METHOD *BIO_s_log(void);
6681 const BIO_METHOD *BIO_s_bio(void);
6682 const BIO_METHOD *BIO_s_null(void);
6683 const BIO_METHOD *BIO_f_null(void);
6684 const BIO_METHOD *BIO_f_buffer(void);
6685 const BIO_METHOD *BIO_f_readbuffer(void);
6686 const BIO_METHOD *BIO_f_linebuffer(void);
6687 const BIO_METHOD *BIO_f_nbio_test(void);
6688 const BIO_METHOD *BIO_f_prefix(void);
6689 const BIO_METHOD *BIO_s_core(void);
6690
6691 const BIO_METHOD *BIO_s_dgram_pair(void);
6692 const BIO_METHOD *BIO_s_datagram(void);
6693 int BIO_dgram_non_fatal_error(int error);
6694 BIO *BIO_new_dgram(int fd, int close_flag);
6695 # 812 "include/openssl/bio.h"
6696 int BIO_sock_should_retry(int i);
6697 int BIO_sock_non_fatal_error(int error);
6698 int BIO_err_is_non_fatal(unsigned int errcode);
6699 int BIO_socket_wait(int fd, int for_read, time_t max_time);
6700
6701 int BIO_wait(BIO *bio, time_t max_time, unsigned int nap_milliseconds);
6702 int BIO_do_connect_retry(BIO *bio, int timeout, int nap_milliseconds);
6703
6704 int BIO_fd_should_retry(int i);
6705 int BIO_fd_non_fatal_error(int error);
6706 int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
6707 void *u, const void *s, int len);
6708 int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
6709 void *u, const void *s, int len, int indent);
6710 int BIO_dump(BIO *b, const void *bytes, int len);
6711 int BIO_dump_indent(BIO *b, const void *bytes, int len, int indent);
6712
6713 int BIO_dump_fp(FILE *fp, const void *s, int len);
6714 int BIO_dump_indent_fp(FILE *fp, const void *s, int len, int indent);
6715
6716 int BIO_hex_string(BIO *out, int indent, int width, const void *data,
6717 int datalen);
6718
6719
6720 BIO_ADDR *BIO_ADDR_new(void);
6721 int BIO_ADDR_copy(BIO_ADDR *dst, const BIO_ADDR *src);
6722 BIO_ADDR *BIO_ADDR_dup(const BIO_ADDR *ap);
6723 int BIO_ADDR_rawmake(BIO_ADDR *ap, int family,
6724 const void *where, size_t wherelen, unsigned short port);
6725 void BIO_ADDR_free(BIO_ADDR *);
6726 void BIO_ADDR_clear(BIO_ADDR *ap);
6727 int BIO_ADDR_family(const BIO_ADDR *ap);
6728 int BIO_ADDR_rawaddress(const BIO_ADDR *ap, void *p, size_t *l);
6729 unsigned short BIO_ADDR_rawport(const BIO_ADDR *ap);
6730 char *BIO_ADDR_hostname_string(const BIO_ADDR *ap, int numeric);
6731 char *BIO_ADDR_service_string(const BIO_ADDR *ap, int numeric);
6732 char *BIO_ADDR_path_string(const BIO_ADDR *ap);
6733
6734 const BIO_ADDRINFO *BIO_ADDRINFO_next(const BIO_ADDRINFO *bai);
6735 int BIO_ADDRINFO_family(const BIO_ADDRINFO *bai);
6736 int BIO_ADDRINFO_socktype(const BIO_ADDRINFO *bai);
6737 int BIO_ADDRINFO_protocol(const BIO_ADDRINFO *bai);
6738 const BIO_ADDR *BIO_ADDRINFO_address(const BIO_ADDRINFO *bai);
6739 void BIO_ADDRINFO_free(BIO_ADDRINFO *bai);
6740
6741 enum BIO_hostserv_priorities {
6742 BIO_PARSE_PRIO_HOST, BIO_PARSE_PRIO_SERV
6743 };
6744 int BIO_parse_hostserv(const char *hostserv, char **host, char **service,
6745 enum BIO_hostserv_priorities hostserv_prio);
6746 enum BIO_lookup_type {
6747 BIO_LOOKUP_CLIENT, BIO_LOOKUP_SERVER
6748 };
6749 int BIO_lookup(const char *host, const char *service,
6750 enum BIO_lookup_type lookup_type,
6751 int family, int socktype, BIO_ADDRINFO **res);
6752 int BIO_lookup_ex(const char *host, const char *service,
6753 int lookup_type, int family, int socktype, int protocol,
6754 BIO_ADDRINFO **res);
6755 int BIO_sock_error(int sock);
6756 int BIO_socket_ioctl(int fd, long type, void *arg);
6757 int BIO_socket_nbio(int fd, int mode);
6758 int BIO_sock_init(void);
6759
6760
6761
6762 int BIO_set_tcp_ndelay(int sock, int turn_on);
6763
6764 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) struct hostent *BIO_gethostbyname(const char *name);
6765 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) int BIO_get_port(const char *str, unsigned short *port_ptr);
6766 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) int BIO_get_host_ip(const char *str, unsigned char *ip);
6767 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) int BIO_get_accept_socket(char *host_port, int mode);
6768 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) int BIO_accept(int sock, char **ip_port);
6769
6770
6771 union BIO_sock_info_u {
6772 BIO_ADDR *addr;
6773 };
6774 enum BIO_sock_info_type {
6775 BIO_SOCK_INFO_ADDRESS
6776 };
6777 int BIO_sock_info(int sock,
6778 enum BIO_sock_info_type type, union BIO_sock_info_u *info);
6779 # 903 "include/openssl/bio.h"
6780 int BIO_socket(int domain, int socktype, int protocol, int options);
6781 int BIO_connect(int sock, const BIO_ADDR *addr, int options);
6782 int BIO_bind(int sock, const BIO_ADDR *addr, int options);
6783 int BIO_listen(int sock, const BIO_ADDR *addr, int options);
6784 int BIO_accept_ex(int accept_sock, BIO_ADDR *addr, int options);
6785 int BIO_closesocket(int sock);
6786
6787 BIO *BIO_new_socket(int sock, int close_flag);
6788 BIO *BIO_new_connect(const char *host_port);
6789 BIO *BIO_new_accept(const char *host_port);
6790
6791
6792 BIO *BIO_new_fd(int fd, int close_flag);
6793
6794 int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
6795 BIO **bio2, size_t writebuf2);
6796
6797 int BIO_new_bio_dgram_pair(BIO **bio1, size_t writebuf1,
6798 BIO **bio2, size_t writebuf2);
6799 # 930 "include/openssl/bio.h"
6800 void BIO_copy_next_retry(BIO *b);
6801 # 954 "include/openssl/bio.h"
6802 int BIO_printf(BIO *bio, const char *format, ...)
6803 __attribute__((__format__(__gnu_printf__, 2, 3)));
6804 int BIO_vprintf(BIO *bio, const char *format, va_list args)
6805 __attribute__((__format__(__gnu_printf__, 2, 0)));
6806 int BIO_snprintf(char *buf, size_t n, const char *format, ...)
6807 __attribute__((__format__(__gnu_printf__, 3, 4)));
6808 int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
6809 __attribute__((__format__(__gnu_printf__, 3, 0)));
6810
6811
6812
6813
6814 BIO_METHOD *BIO_meth_new(int type, const char *name);
6815 void BIO_meth_free(BIO_METHOD *biom);
6816 int (*BIO_meth_get_write(const BIO_METHOD *biom)) (BIO *, const char *, int);
6817 int (*BIO_meth_get_write_ex(const BIO_METHOD *biom)) (BIO *, const char *, size_t,
6818 size_t *);
6819 int BIO_meth_set_write(BIO_METHOD *biom,
6820 int (*write) (BIO *, const char *, int));
6821 int BIO_meth_set_write_ex(BIO_METHOD *biom,
6822 int (*bwrite) (BIO *, const char *, size_t, size_t *));
6823 int BIO_meth_set_sendmmsg(BIO_METHOD *biom,
6824 int (*f) (BIO *, BIO_MSG *, size_t, size_t,
6825 uint64_t, size_t *));
6826 int (*BIO_meth_get_sendmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
6827 size_t, size_t,
6828 uint64_t, size_t *);
6829 int (*BIO_meth_get_read(const BIO_METHOD *biom)) (BIO *, char *, int);
6830 int (*BIO_meth_get_read_ex(const BIO_METHOD *biom)) (BIO *, char *, size_t, size_t *);
6831 int BIO_meth_set_read(BIO_METHOD *biom,
6832 int (*read) (BIO *, char *, int));
6833 int BIO_meth_set_read_ex(BIO_METHOD *biom,
6834 int (*bread) (BIO *, char *, size_t, size_t *));
6835 int BIO_meth_set_recvmmsg(BIO_METHOD *biom,
6836 int (*f) (BIO *, BIO_MSG *, size_t, size_t,
6837 uint64_t, size_t *));
6838 int (*BIO_meth_get_recvmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
6839 size_t, size_t,
6840 uint64_t, size_t *);
6841 int (*BIO_meth_get_puts(const BIO_METHOD *biom)) (BIO *, const char *);
6842 int BIO_meth_set_puts(BIO_METHOD *biom,
6843 int (*puts) (BIO *, const char *));
6844 int (*BIO_meth_get_gets(const BIO_METHOD *biom)) (BIO *, char *, int);
6845 int BIO_meth_set_gets(BIO_METHOD *biom,
6846 int (*ossl_gets) (BIO *, char *, int));
6847 long (*BIO_meth_get_ctrl(const BIO_METHOD *biom)) (BIO *, int, long, void *);
6848 int BIO_meth_set_ctrl(BIO_METHOD *biom,
6849 long (*ctrl) (BIO *, int, long, void *));
6850 int (*BIO_meth_get_create(const BIO_METHOD *bion)) (BIO *);
6851 int BIO_meth_set_create(BIO_METHOD *biom, int (*create) (BIO *));
6852 int (*BIO_meth_get_destroy(const BIO_METHOD *biom)) (BIO *);
6853 int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy) (BIO *));
6854 long (*BIO_meth_get_callback_ctrl(const BIO_METHOD *biom))
6855 (BIO *, int, BIO_info_cb *);
6856 int BIO_meth_set_callback_ctrl(BIO_METHOD *biom,
6857 long (*callback_ctrl) (BIO *, int,
6858 BIO_info_cb *));
6859 # 23 "ssl/ssl_local.h" 2
6860 # 1 "include/openssl/comp.h" 1
6861 # 12 "include/openssl/comp.h"
6862
6863 # 23 "include/openssl/comp.h"
6864 # 1 "include/openssl/comperr.h" 1
6865 # 13 "include/openssl/comperr.h"
6866
6867 # 24 "include/openssl/comp.h" 2
6868
6869
6870
6871
6872
6873
6874 COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
6875 const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx);
6876 int COMP_CTX_get_type(const COMP_CTX* comp);
6877 int COMP_get_type(const COMP_METHOD *meth);
6878 const char *COMP_get_name(const COMP_METHOD *meth);
6879 void COMP_CTX_free(COMP_CTX *ctx);
6880
6881 int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
6882 unsigned char *in, int ilen);
6883 int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
6884 unsigned char *in, int ilen);
6885
6886 COMP_METHOD *COMP_zlib(void);
6887 COMP_METHOD *COMP_zlib_oneshot(void);
6888 COMP_METHOD *COMP_brotli(void);
6889 COMP_METHOD *COMP_brotli_oneshot(void);
6890 COMP_METHOD *COMP_zstd(void);
6891 COMP_METHOD *COMP_zstd_oneshot(void);
6892
6893
6894
6895
6896
6897
6898 const BIO_METHOD *BIO_f_zlib(void);
6899 const BIO_METHOD *BIO_f_brotli(void);
6900 const BIO_METHOD *BIO_f_zstd(void);
6901 # 24 "ssl/ssl_local.h" 2
6902 # 1 "include/openssl/dsa.h" 1
6903 # 12 "include/openssl/dsa.h"
6904
6905
6906
6907
6908
6909
6910
6911
6912 # 1 "include/openssl/types.h" 1
6913 # 21 "include/openssl/dsa.h" 2
6914
6915
6916
6917
6918
6919 # 1 "include/openssl/asn1.h" 1
6920 # 17 "include/openssl/asn1.h"
6921
6922 # 32 "include/openssl/asn1.h"
6923 # 1 "include/openssl/asn1err.h" 1
6924 # 13 "include/openssl/asn1err.h"
6925
6926 # 33 "include/openssl/asn1.h" 2
6927
6928
6929 # 1 "include/openssl/types.h" 1
6930 # 36 "include/openssl/asn1.h" 2
6931 # 1 "include/openssl/bn.h" 1
6932 # 13 "include/openssl/bn.h"
6933
6934 # 25 "include/openssl/bn.h"
6935 # 1 "include/openssl/types.h" 1
6936 # 26 "include/openssl/bn.h" 2
6937
6938 # 1 "include/openssl/bnerr.h" 1
6939 # 13 "include/openssl/bnerr.h"
6940
6941 # 28 "include/openssl/bn.h" 2
6942 # 76 "include/openssl/bn.h"
6943 void BN_set_flags(BIGNUM *b, int n);
6944 int BN_get_flags(const BIGNUM *b, int n);
6945 # 94 "include/openssl/bn.h"
6946 void BN_with_flags(BIGNUM *dest, const BIGNUM *b, int flags);
6947
6948
6949 int BN_GENCB_call(BN_GENCB *cb, int a, int b);
6950
6951 BN_GENCB *BN_GENCB_new(void);
6952 void BN_GENCB_free(BN_GENCB *cb);
6953
6954
6955 void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback) (int, int, void *),
6956 void *cb_arg);
6957
6958
6959 void BN_GENCB_set(BN_GENCB *gencb, int (*callback) (int, int, BN_GENCB *),
6960 void *cb_arg);
6961
6962 void *BN_GENCB_get_arg(BN_GENCB *cb);
6963 # 191 "include/openssl/bn.h"
6964 int BN_abs_is_word(const BIGNUM *a, const unsigned long w);
6965 int BN_is_zero(const BIGNUM *a);
6966 int BN_is_one(const BIGNUM *a);
6967 int BN_is_word(const BIGNUM *a, const unsigned long w);
6968 int BN_is_odd(const BIGNUM *a);
6969
6970
6971
6972 void BN_zero_ex(BIGNUM *a);
6973
6974
6975
6976
6977
6978
6979
6980 const BIGNUM *BN_value_one(void);
6981 char *BN_options(void);
6982 BN_CTX *BN_CTX_new_ex(OSSL_LIB_CTX *ctx);
6983 BN_CTX *BN_CTX_new(void);
6984 BN_CTX *BN_CTX_secure_new_ex(OSSL_LIB_CTX *ctx);
6985 BN_CTX *BN_CTX_secure_new(void);
6986 void BN_CTX_free(BN_CTX *c);
6987 void BN_CTX_start(BN_CTX *ctx);
6988 BIGNUM *BN_CTX_get(BN_CTX *ctx);
6989 void BN_CTX_end(BN_CTX *ctx);
6990 int BN_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
6991 unsigned int strength, BN_CTX *ctx);
6992 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
6993 int BN_priv_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
6994 unsigned int strength, BN_CTX *ctx);
6995 int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom);
6996 int BN_rand_range_ex(BIGNUM *r, const BIGNUM *range, unsigned int strength,
6997 BN_CTX *ctx);
6998 int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
6999 int BN_priv_rand_range_ex(BIGNUM *r, const BIGNUM *range,
7000 unsigned int strength, BN_CTX *ctx);
7001 int BN_priv_rand_range(BIGNUM *rnd, const BIGNUM *range);
7002
7003 __attribute__((deprecated("Since OpenSSL " "3.0")))
7004 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
7005 __attribute__((deprecated("Since OpenSSL " "3.0")))
7006 int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
7007
7008 int BN_num_bits(const BIGNUM *a);
7009 int BN_num_bits_word(unsigned long l);
7010 int BN_security_bits(int L, int N);
7011 BIGNUM *BN_new(void);
7012 BIGNUM *BN_secure_new(void);
7013 void BN_clear_free(BIGNUM *a);
7014 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
7015 void BN_swap(BIGNUM *a, BIGNUM *b);
7016 BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
7017 BIGNUM *BN_signed_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
7018 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
7019 int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen);
7020 int BN_signed_bn2bin(const BIGNUM *a, unsigned char *to, int tolen);
7021 BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);
7022 BIGNUM *BN_signed_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);
7023 int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen);
7024 int BN_signed_bn2lebin(const BIGNUM *a, unsigned char *to, int tolen);
7025 BIGNUM *BN_native2bn(const unsigned char *s, int len, BIGNUM *ret);
7026 BIGNUM *BN_signed_native2bn(const unsigned char *s, int len, BIGNUM *ret);
7027 int BN_bn2nativepad(const BIGNUM *a, unsigned char *to, int tolen);
7028 int BN_signed_bn2native(const BIGNUM *a, unsigned char *to, int tolen);
7029 BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
7030 int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
7031 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
7032 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
7033 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
7034 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
7035 int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
7036 int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
7037
7038
7039
7040
7041 void BN_set_negative(BIGNUM *b, int n);
7042
7043
7044
7045
7046 int BN_is_negative(const BIGNUM *b);
7047
7048 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
7049 BN_CTX *ctx);
7050
7051 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
7052 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
7053 BN_CTX *ctx);
7054 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7055 const BIGNUM *m);
7056 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
7057 BN_CTX *ctx);
7058 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7059 const BIGNUM *m);
7060 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
7061 BN_CTX *ctx);
7062 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
7063 int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
7064 int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
7065 int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
7066 BN_CTX *ctx);
7067 int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
7068
7069 unsigned long BN_mod_word(const BIGNUM *a, unsigned long w);
7070 unsigned long BN_div_word(BIGNUM *a, unsigned long w);
7071 int BN_mul_word(BIGNUM *a, unsigned long w);
7072 int BN_add_word(BIGNUM *a, unsigned long w);
7073 int BN_sub_word(BIGNUM *a, unsigned long w);
7074 int BN_set_word(BIGNUM *a, unsigned long w);
7075 unsigned long BN_get_word(const BIGNUM *a);
7076
7077 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
7078 void BN_free(BIGNUM *a);
7079 int BN_is_bit_set(const BIGNUM *a, int n);
7080 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
7081 int BN_lshift1(BIGNUM *r, const BIGNUM *a);
7082 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
7083
7084 int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
7085 const BIGNUM *m, BN_CTX *ctx);
7086 int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
7087 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
7088 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
7089 const BIGNUM *m, BN_CTX *ctx,
7090 BN_MONT_CTX *in_mont);
7091 int BN_mod_exp_mont_word(BIGNUM *r, unsigned long a, const BIGNUM *p,
7092 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
7093 int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
7094 const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
7095 BN_CTX *ctx, BN_MONT_CTX *m_ctx);
7096 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
7097 const BIGNUM *m, BN_CTX *ctx);
7098 int BN_mod_exp_mont_consttime_x2(BIGNUM *rr1, const BIGNUM *a1, const BIGNUM *p1,
7099 const BIGNUM *m1, BN_MONT_CTX *in_mont1,
7100 BIGNUM *rr2, const BIGNUM *a2, const BIGNUM *p2,
7101 const BIGNUM *m2, BN_MONT_CTX *in_mont2,
7102 BN_CTX *ctx);
7103
7104 int BN_mask_bits(BIGNUM *a, int n);
7105
7106 int BN_print_fp(FILE *fp, const BIGNUM *a);
7107
7108 int BN_print(BIO *bio, const BIGNUM *a);
7109 int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
7110 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
7111 int BN_rshift1(BIGNUM *r, const BIGNUM *a);
7112 void BN_clear(BIGNUM *a);
7113 BIGNUM *BN_dup(const BIGNUM *a);
7114 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
7115 int BN_set_bit(BIGNUM *a, int n);
7116 int BN_clear_bit(BIGNUM *a, int n);
7117 char *BN_bn2hex(const BIGNUM *a);
7118 char *BN_bn2dec(const BIGNUM *a);
7119 int BN_hex2bn(BIGNUM **a, const char *str);
7120 int BN_dec2bn(BIGNUM **a, const char *str);
7121 int BN_asc2bn(BIGNUM **a, const char *str);
7122 int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
7123 int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
7124
7125
7126 int BN_are_coprime(BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
7127 BIGNUM *BN_mod_inverse(BIGNUM *ret,
7128 const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
7129 BIGNUM *BN_mod_sqrt(BIGNUM *ret,
7130 const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
7131
7132 void BN_consttime_swap(unsigned long swap, BIGNUM *a, BIGNUM *b, int nwords);
7133
7134
7135
7136 __attribute__((deprecated("Since OpenSSL " "0.9.8")))
7137 BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
7138 const BIGNUM *add, const BIGNUM *rem,
7139 void (*callback) (int, int, void *),
7140 void *cb_arg);
7141 __attribute__((deprecated("Since OpenSSL " "0.9.8")))
7142 int BN_is_prime(const BIGNUM *p, int nchecks,
7143 void (*callback) (int, int, void *),
7144 BN_CTX *ctx, void *cb_arg);
7145 __attribute__((deprecated("Since OpenSSL " "0.9.8")))
7146 int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
7147 void (*callback) (int, int, void *),
7148 BN_CTX *ctx, void *cb_arg,
7149 int do_trial_division);
7150
7151
7152 __attribute__((deprecated("Since OpenSSL " "3.0")))
7153 int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
7154 __attribute__((deprecated("Since OpenSSL " "3.0")))
7155 int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
7156 int do_trial_division, BN_GENCB *cb);
7157
7158
7159 int BN_generate_prime_ex2(BIGNUM *ret, int bits, int safe,
7160 const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb,
7161 BN_CTX *ctx);
7162 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
7163 const BIGNUM *rem, BN_GENCB *cb);
7164 int BN_check_prime(const BIGNUM *p, BN_CTX *ctx, BN_GENCB *cb);
7165
7166
7167 __attribute__((deprecated("Since OpenSSL " "3.0")))
7168 int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
7169
7170 __attribute__((deprecated("Since OpenSSL " "3.0")))
7171 int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
7172 const BIGNUM *Xp, const BIGNUM *Xp1,
7173 const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
7174 BN_GENCB *cb);
7175 __attribute__((deprecated("Since OpenSSL " "3.0")))
7176 int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
7177 BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
7178 BN_CTX *ctx, BN_GENCB *cb);
7179
7180
7181 BN_MONT_CTX *BN_MONT_CTX_new(void);
7182 int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7183 BN_MONT_CTX *mont, BN_CTX *ctx);
7184 int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
7185 BN_CTX *ctx);
7186 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
7187 BN_CTX *ctx);
7188 void BN_MONT_CTX_free(BN_MONT_CTX *mont);
7189 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
7190 BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
7191 BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, CRYPTO_RWLOCK *lock,
7192 const BIGNUM *mod, BN_CTX *ctx);
7193
7194
7195
7196
7197
7198 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
7199 void BN_BLINDING_free(BN_BLINDING *b);
7200 int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
7201 int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
7202 int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
7203 int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
7204 int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
7205 BN_CTX *);
7206
7207 int BN_BLINDING_is_current_thread(BN_BLINDING *b);
7208 void BN_BLINDING_set_current_thread(BN_BLINDING *b);
7209 int BN_BLINDING_lock(BN_BLINDING *b);
7210 int BN_BLINDING_unlock(BN_BLINDING *b);
7211
7212 unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
7213 void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
7214 BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
7215 const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
7216 int (*bn_mod_exp) (BIGNUM *r,
7217 const BIGNUM *a,
7218 const BIGNUM *p,
7219 const BIGNUM *m,
7220 BN_CTX *ctx,
7221 BN_MONT_CTX *m_ctx),
7222 BN_MONT_CTX *m_ctx);
7223
7224 __attribute__((deprecated("Since OpenSSL " "0.9.8")))
7225 void BN_set_params(int mul, int high, int low, int mont);
7226 __attribute__((deprecated("Since OpenSSL " "0.9.8")))
7227 int BN_get_params(int which);
7228
7229
7230 BN_RECP_CTX *BN_RECP_CTX_new(void);
7231 void BN_RECP_CTX_free(BN_RECP_CTX *recp);
7232 int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
7233 int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
7234 BN_RECP_CTX *recp, BN_CTX *ctx);
7235 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
7236 const BIGNUM *m, BN_CTX *ctx);
7237 int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
7238 BN_RECP_CTX *recp, BN_CTX *ctx);
7239 # 479 "include/openssl/bn.h"
7240 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
7241
7242
7243
7244
7245 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
7246
7247 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7248 const BIGNUM *p, BN_CTX *ctx);
7249
7250 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
7251
7252 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
7253
7254 int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7255 const BIGNUM *p, BN_CTX *ctx);
7256
7257 int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7258 const BIGNUM *p, BN_CTX *ctx);
7259
7260 int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
7261 BN_CTX *ctx);
7262
7263 int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
7264 BN_CTX *ctx);
7265 # 512 "include/openssl/bn.h"
7266 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
7267
7268 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7269 const int p[], BN_CTX *ctx);
7270
7271 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
7272 BN_CTX *ctx);
7273
7274 int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
7275 BN_CTX *ctx);
7276
7277 int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7278 const int p[], BN_CTX *ctx);
7279
7280 int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7281 const int p[], BN_CTX *ctx);
7282
7283 int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
7284 const int p[], BN_CTX *ctx);
7285
7286 int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
7287 const int p[], BN_CTX *ctx);
7288 int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
7289 int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
7290
7291
7292
7293
7294
7295
7296 int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
7297 int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
7298 int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
7299 int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
7300 int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
7301
7302 const BIGNUM *BN_get0_nist_prime_192(void);
7303 const BIGNUM *BN_get0_nist_prime_224(void);
7304 const BIGNUM *BN_get0_nist_prime_256(void);
7305 const BIGNUM *BN_get0_nist_prime_384(void);
7306 const BIGNUM *BN_get0_nist_prime_521(void);
7307
7308 int (*BN_nist_mod_func(const BIGNUM *p)) (BIGNUM *r, const BIGNUM *a,
7309 const BIGNUM *field, BN_CTX *ctx);
7310
7311 int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range,
7312 const BIGNUM *priv, const unsigned char *message,
7313 size_t message_len, BN_CTX *ctx);
7314
7315
7316 BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn);
7317 BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn);
7318
7319
7320 BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn);
7321 BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *bn);
7322 BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn);
7323 BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn);
7324 BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn);
7325 BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn);
7326 # 584 "include/openssl/bn.h"
7327 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
7328 # 37 "include/openssl/asn1.h" 2
7329 # 132 "include/openssl/asn1.h"
7330 struct stack_st_X509_ALGOR; typedef int (*sk_X509_ALGOR_compfunc)(const X509_ALGOR * const *a, const X509_ALGOR *const *b); typedef void (*sk_X509_ALGOR_freefunc)(X509_ALGOR *a); typedef X509_ALGOR * (*sk_X509_ALGOR_copyfunc)(const X509_ALGOR *a); static __attribute__((unused)) inline X509_ALGOR *ossl_check_X509_ALGOR_type(X509_ALGOR *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_ALGOR_sk_type(const struct stack_st_X509_ALGOR *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_ALGOR_sk_type(struct stack_st_X509_ALGOR *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_ALGOR_compfunc_type(sk_X509_ALGOR_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_ALGOR_copyfunc_type(sk_X509_ALGOR_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_ALGOR_freefunc_type(sk_X509_ALGOR_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
7331 # 186 "include/openssl/asn1.h"
7332 struct asn1_string_st {
7333 int length;
7334 int type;
7335 unsigned char *data;
7336
7337
7338
7339
7340
7341 long flags;
7342 };
7343
7344
7345
7346
7347
7348
7349
7350 typedef struct ASN1_ENCODING_st {
7351 unsigned char *enc;
7352 long len;
7353 int modified;
7354 } ASN1_ENCODING;
7355 # 226 "include/openssl/asn1.h"
7356 struct asn1_string_table_st {
7357 int nid;
7358 long minsize;
7359 long maxsize;
7360 unsigned long mask;
7361 unsigned long flags;
7362 };
7363
7364 struct stack_st_ASN1_STRING_TABLE; typedef int (*sk_ASN1_STRING_TABLE_compfunc)(const ASN1_STRING_TABLE * const *a, const ASN1_STRING_TABLE *const *b); typedef void (*sk_ASN1_STRING_TABLE_freefunc)(ASN1_STRING_TABLE *a); typedef ASN1_STRING_TABLE * (*sk_ASN1_STRING_TABLE_copyfunc)(const ASN1_STRING_TABLE *a); static __attribute__((unused)) inline ASN1_STRING_TABLE *ossl_check_ASN1_STRING_TABLE_type(ASN1_STRING_TABLE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASN1_STRING_TABLE_sk_type(const struct stack_st_ASN1_STRING_TABLE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASN1_STRING_TABLE_sk_type(struct stack_st_ASN1_STRING_TABLE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASN1_STRING_TABLE_compfunc_type(sk_ASN1_STRING_TABLE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASN1_STRING_TABLE_copyfunc_type(sk_ASN1_STRING_TABLE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASN1_STRING_TABLE_freefunc_type(sk_ASN1_STRING_TABLE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
7365 # 276 "include/openssl/asn1.h"
7366 typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
7367 typedef struct ASN1_TLC_st ASN1_TLC;
7368
7369 typedef struct ASN1_VALUE_st ASN1_VALUE;
7370 # 372 "include/openssl/asn1.h"
7371 typedef void *d2i_of_void(void **, const unsigned char **, long);
7372 typedef int i2d_of_void(const void *, unsigned char **);
7373 # 418 "include/openssl/asn1.h"
7374 typedef const ASN1_ITEM *ASN1_ITEM_EXP (void);
7375 # 523 "include/openssl/asn1.h"
7376 struct asn1_type_st {
7377 int type;
7378 union {
7379 char *ptr;
7380 ASN1_BOOLEAN boolean;
7381 ASN1_STRING *asn1_string;
7382 ASN1_OBJECT *object;
7383 ASN1_INTEGER *integer;
7384 ASN1_ENUMERATED *enumerated;
7385 ASN1_BIT_STRING *bit_string;
7386 ASN1_OCTET_STRING *octet_string;
7387 ASN1_PRINTABLESTRING *printablestring;
7388 ASN1_T61STRING *t61string;
7389 ASN1_IA5STRING *ia5string;
7390 ASN1_GENERALSTRING *generalstring;
7391 ASN1_BMPSTRING *bmpstring;
7392 ASN1_UNIVERSALSTRING *universalstring;
7393 ASN1_UTCTIME *utctime;
7394 ASN1_GENERALIZEDTIME *generalizedtime;
7395 ASN1_VISIBLESTRING *visiblestring;
7396 ASN1_UTF8STRING *utf8string;
7397
7398
7399
7400
7401 ASN1_STRING *set;
7402 ASN1_STRING *sequence;
7403 ASN1_VALUE *asn1_value;
7404 } value;
7405 };
7406
7407 struct stack_st_ASN1_TYPE; typedef int (*sk_ASN1_TYPE_compfunc)(const ASN1_TYPE * const *a, const ASN1_TYPE *const *b); typedef void (*sk_ASN1_TYPE_freefunc)(ASN1_TYPE *a); typedef ASN1_TYPE * (*sk_ASN1_TYPE_copyfunc)(const ASN1_TYPE *a); static __attribute__((unused)) inline ASN1_TYPE *ossl_check_ASN1_TYPE_type(ASN1_TYPE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASN1_TYPE_sk_type(const struct stack_st_ASN1_TYPE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASN1_TYPE_sk_type(struct stack_st_ASN1_TYPE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASN1_TYPE_compfunc_type(sk_ASN1_TYPE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASN1_TYPE_copyfunc_type(sk_ASN1_TYPE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASN1_TYPE_freefunc_type(sk_ASN1_TYPE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
7408 # 582 "include/openssl/asn1.h"
7409 typedef struct stack_st_ASN1_TYPE ASN1_SEQUENCE_ANY;
7410
7411 extern ASN1_SEQUENCE_ANY *d2i_ASN1_SEQUENCE_ANY(ASN1_SEQUENCE_ANY **a, const unsigned char **in, long len); extern int i2d_ASN1_SEQUENCE_ANY(const ASN1_SEQUENCE_ANY *a, unsigned char **out); extern const ASN1_ITEM * ASN1_SEQUENCE_ANY_it(void);
7412 extern ASN1_SEQUENCE_ANY *d2i_ASN1_SET_ANY(ASN1_SEQUENCE_ANY **a, const unsigned char **in, long len); extern int i2d_ASN1_SET_ANY(const ASN1_SEQUENCE_ANY *a, unsigned char **out); extern const ASN1_ITEM * ASN1_SET_ANY_it(void);
7413
7414
7415 typedef struct BIT_STRING_BITNAME_st {
7416 int bitnum;
7417 const char *lname;
7418 const char *sname;
7419 } BIT_STRING_BITNAME;
7420 # 623 "include/openssl/asn1.h"
7421 extern ASN1_TYPE *ASN1_TYPE_new(void); extern void ASN1_TYPE_free(ASN1_TYPE *a);
7422 extern ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, const unsigned char **in, long len); extern int i2d_ASN1_TYPE(const ASN1_TYPE *a, unsigned char **out); extern const ASN1_ITEM * ASN1_ANY_it(void);
7423
7424 int ASN1_TYPE_get(const ASN1_TYPE *a);
7425 void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
7426 int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
7427 int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
7428
7429 ASN1_TYPE *ASN1_TYPE_pack_sequence(const ASN1_ITEM *it, void *s, ASN1_TYPE **t);
7430 void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t);
7431
7432 struct stack_st_ASN1_OBJECT; typedef int (*sk_ASN1_OBJECT_compfunc)(const ASN1_OBJECT * const *a, const ASN1_OBJECT *const *b); typedef void (*sk_ASN1_OBJECT_freefunc)(ASN1_OBJECT *a); typedef ASN1_OBJECT * (*sk_ASN1_OBJECT_copyfunc)(const ASN1_OBJECT *a); static __attribute__((unused)) inline ASN1_OBJECT *ossl_check_ASN1_OBJECT_type(ASN1_OBJECT *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASN1_OBJECT_sk_type(const struct stack_st_ASN1_OBJECT *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASN1_OBJECT_sk_type(struct stack_st_ASN1_OBJECT *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASN1_OBJECT_compfunc_type(sk_ASN1_OBJECT_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASN1_OBJECT_copyfunc_type(sk_ASN1_OBJECT_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASN1_OBJECT_freefunc_type(sk_ASN1_OBJECT_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
7433 # 662 "include/openssl/asn1.h"
7434 extern ASN1_OBJECT *ASN1_OBJECT_new(void); extern void ASN1_OBJECT_free(ASN1_OBJECT *a); extern ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **in, long len); extern int i2d_ASN1_OBJECT(const ASN1_OBJECT *a, unsigned char **out); extern const ASN1_ITEM * ASN1_OBJECT_it(void);
7435
7436 ASN1_STRING *ASN1_STRING_new(void);
7437 void ASN1_STRING_free(ASN1_STRING *a);
7438 void ASN1_STRING_clear_free(ASN1_STRING *a);
7439 int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
7440 extern ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a);
7441 ASN1_STRING *ASN1_STRING_type_new(int type);
7442 int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
7443
7444
7445
7446
7447 int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
7448 void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
7449 int ASN1_STRING_length(const ASN1_STRING *x);
7450
7451 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ASN1_STRING_length_set(ASN1_STRING *x, int n);
7452
7453 int ASN1_STRING_type(const ASN1_STRING *x);
7454
7455 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) unsigned char *ASN1_STRING_data(ASN1_STRING *x);
7456
7457 const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x);
7458
7459 extern ASN1_BIT_STRING *ASN1_BIT_STRING_new(void); extern void ASN1_BIT_STRING_free(ASN1_BIT_STRING *a); extern ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **in, long len); extern int i2d_ASN1_BIT_STRING(const ASN1_BIT_STRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_BIT_STRING_it(void);
7460 int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
7461 int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
7462 int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n);
7463 int ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a,
7464 const unsigned char *flags, int flags_len);
7465
7466 int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
7467 BIT_STRING_BITNAME *tbl, int indent);
7468 int ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl);
7469 int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value,
7470 BIT_STRING_BITNAME *tbl);
7471
7472 struct stack_st_ASN1_INTEGER; typedef int (*sk_ASN1_INTEGER_compfunc)(const ASN1_INTEGER * const *a, const ASN1_INTEGER *const *b); typedef void (*sk_ASN1_INTEGER_freefunc)(ASN1_INTEGER *a); typedef ASN1_INTEGER * (*sk_ASN1_INTEGER_copyfunc)(const ASN1_INTEGER *a); static __attribute__((unused)) inline ASN1_INTEGER *ossl_check_ASN1_INTEGER_type(ASN1_INTEGER *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASN1_INTEGER_sk_type(const struct stack_st_ASN1_INTEGER *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASN1_INTEGER_sk_type(struct stack_st_ASN1_INTEGER *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASN1_INTEGER_compfunc_type(sk_ASN1_INTEGER_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASN1_INTEGER_copyfunc_type(sk_ASN1_INTEGER_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASN1_INTEGER_freefunc_type(sk_ASN1_INTEGER_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
7473 # 729 "include/openssl/asn1.h"
7474 extern ASN1_INTEGER *ASN1_INTEGER_new(void); extern void ASN1_INTEGER_free(ASN1_INTEGER *a); extern ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **in, long len); extern int i2d_ASN1_INTEGER(const ASN1_INTEGER *a, unsigned char **out); extern const ASN1_ITEM * ASN1_INTEGER_it(void);
7475 ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
7476 long length);
7477 extern ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *a);
7478 int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
7479
7480 extern ASN1_ENUMERATED *ASN1_ENUMERATED_new(void); extern void ASN1_ENUMERATED_free(ASN1_ENUMERATED *a); extern ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, const unsigned char **in, long len); extern int i2d_ASN1_ENUMERATED(const ASN1_ENUMERATED *a, unsigned char **out); extern const ASN1_ITEM * ASN1_ENUMERATED_it(void);
7481
7482 int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
7483 ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
7484 ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
7485 int offset_day, long offset_sec);
7486 int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
7487 int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
7488
7489 int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
7490 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
7491 time_t t);
7492 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
7493 time_t t, int offset_day,
7494 long offset_sec);
7495 int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
7496
7497 int ASN1_TIME_diff(int *pday, int *psec,
7498 const ASN1_TIME *from, const ASN1_TIME *to);
7499
7500 extern ASN1_OCTET_STRING *ASN1_OCTET_STRING_new(void); extern void ASN1_OCTET_STRING_free(ASN1_OCTET_STRING *a); extern ASN1_OCTET_STRING *d2i_ASN1_OCTET_STRING(ASN1_OCTET_STRING **a, const unsigned char **in, long len); extern int i2d_ASN1_OCTET_STRING(const ASN1_OCTET_STRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_OCTET_STRING_it(void);
7501 extern ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a);
7502 int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
7503 const ASN1_OCTET_STRING *b);
7504 int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
7505 int len);
7506
7507 struct stack_st_ASN1_UTF8STRING; typedef int (*sk_ASN1_UTF8STRING_compfunc)(const ASN1_UTF8STRING * const *a, const ASN1_UTF8STRING *const *b); typedef void (*sk_ASN1_UTF8STRING_freefunc)(ASN1_UTF8STRING *a); typedef ASN1_UTF8STRING * (*sk_ASN1_UTF8STRING_copyfunc)(const ASN1_UTF8STRING *a); static __attribute__((unused)) inline ASN1_UTF8STRING *ossl_check_ASN1_UTF8STRING_type(ASN1_UTF8STRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASN1_UTF8STRING_sk_type(const struct stack_st_ASN1_UTF8STRING *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASN1_UTF8STRING_sk_type(struct stack_st_ASN1_UTF8STRING *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASN1_UTF8STRING_compfunc_type(sk_ASN1_UTF8STRING_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASN1_UTF8STRING_copyfunc_type(sk_ASN1_UTF8STRING_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASN1_UTF8STRING_freefunc_type(sk_ASN1_UTF8STRING_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
7508 # 790 "include/openssl/asn1.h"
7509 extern ASN1_VISIBLESTRING *ASN1_VISIBLESTRING_new(void); extern void ASN1_VISIBLESTRING_free(ASN1_VISIBLESTRING *a); extern ASN1_VISIBLESTRING *d2i_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING **a, const unsigned char **in, long len); extern int i2d_ASN1_VISIBLESTRING(const ASN1_VISIBLESTRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_VISIBLESTRING_it(void);
7510 extern ASN1_UNIVERSALSTRING *ASN1_UNIVERSALSTRING_new(void); extern void ASN1_UNIVERSALSTRING_free(ASN1_UNIVERSALSTRING *a); extern ASN1_UNIVERSALSTRING *d2i_ASN1_UNIVERSALSTRING(ASN1_UNIVERSALSTRING **a, const unsigned char **in, long len); extern int i2d_ASN1_UNIVERSALSTRING(const ASN1_UNIVERSALSTRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_UNIVERSALSTRING_it(void);
7511 extern ASN1_UTF8STRING *ASN1_UTF8STRING_new(void); extern void ASN1_UTF8STRING_free(ASN1_UTF8STRING *a); extern ASN1_UTF8STRING *d2i_ASN1_UTF8STRING(ASN1_UTF8STRING **a, const unsigned char **in, long len); extern int i2d_ASN1_UTF8STRING(const ASN1_UTF8STRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_UTF8STRING_it(void);
7512 extern ASN1_NULL *ASN1_NULL_new(void); extern void ASN1_NULL_free(ASN1_NULL *a); extern ASN1_NULL *d2i_ASN1_NULL(ASN1_NULL **a, const unsigned char **in, long len); extern int i2d_ASN1_NULL(const ASN1_NULL *a, unsigned char **out); extern const ASN1_ITEM * ASN1_NULL_it(void);
7513 extern ASN1_BMPSTRING *ASN1_BMPSTRING_new(void); extern void ASN1_BMPSTRING_free(ASN1_BMPSTRING *a); extern ASN1_BMPSTRING *d2i_ASN1_BMPSTRING(ASN1_BMPSTRING **a, const unsigned char **in, long len); extern int i2d_ASN1_BMPSTRING(const ASN1_BMPSTRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_BMPSTRING_it(void);
7514
7515 int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
7516 int UTF8_putc(unsigned char *str, int len, unsigned long value);
7517
7518 struct stack_st_ASN1_GENERALSTRING; typedef int (*sk_ASN1_GENERALSTRING_compfunc)(const ASN1_GENERALSTRING * const *a, const ASN1_GENERALSTRING *const *b); typedef void (*sk_ASN1_GENERALSTRING_freefunc)(ASN1_GENERALSTRING *a); typedef ASN1_GENERALSTRING * (*sk_ASN1_GENERALSTRING_copyfunc)(const ASN1_GENERALSTRING *a); static __attribute__((unused)) inline ASN1_GENERALSTRING *ossl_check_ASN1_GENERALSTRING_type(ASN1_GENERALSTRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASN1_GENERALSTRING_sk_type(const struct stack_st_ASN1_GENERALSTRING *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASN1_GENERALSTRING_sk_type(struct stack_st_ASN1_GENERALSTRING *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASN1_GENERALSTRING_compfunc_type(sk_ASN1_GENERALSTRING_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASN1_GENERALSTRING_copyfunc_type(sk_ASN1_GENERALSTRING_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASN1_GENERALSTRING_freefunc_type(sk_ASN1_GENERALSTRING_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
7519 # 827 "include/openssl/asn1.h"
7520 extern ASN1_STRING *ASN1_PRINTABLE_new(void); extern void ASN1_PRINTABLE_free(ASN1_STRING *a); extern ASN1_STRING *d2i_ASN1_PRINTABLE(ASN1_STRING **a, const unsigned char **in, long len); extern int i2d_ASN1_PRINTABLE(const ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_PRINTABLE_it(void);
7521
7522 extern ASN1_STRING *DIRECTORYSTRING_new(void); extern void DIRECTORYSTRING_free(ASN1_STRING *a); extern ASN1_STRING *d2i_DIRECTORYSTRING(ASN1_STRING **a, const unsigned char **in, long len); extern int i2d_DIRECTORYSTRING(const ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM * DIRECTORYSTRING_it(void);
7523 extern ASN1_STRING *DISPLAYTEXT_new(void); extern void DISPLAYTEXT_free(ASN1_STRING *a); extern ASN1_STRING *d2i_DISPLAYTEXT(ASN1_STRING **a, const unsigned char **in, long len); extern int i2d_DISPLAYTEXT(const ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM * DISPLAYTEXT_it(void);
7524 extern ASN1_PRINTABLESTRING *ASN1_PRINTABLESTRING_new(void); extern void ASN1_PRINTABLESTRING_free(ASN1_PRINTABLESTRING *a); extern ASN1_PRINTABLESTRING *d2i_ASN1_PRINTABLESTRING(ASN1_PRINTABLESTRING **a, const unsigned char **in, long len); extern int i2d_ASN1_PRINTABLESTRING(const ASN1_PRINTABLESTRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_PRINTABLESTRING_it(void);
7525 extern ASN1_T61STRING *ASN1_T61STRING_new(void); extern void ASN1_T61STRING_free(ASN1_T61STRING *a); extern ASN1_T61STRING *d2i_ASN1_T61STRING(ASN1_T61STRING **a, const unsigned char **in, long len); extern int i2d_ASN1_T61STRING(const ASN1_T61STRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_T61STRING_it(void);
7526 extern ASN1_IA5STRING *ASN1_IA5STRING_new(void); extern void ASN1_IA5STRING_free(ASN1_IA5STRING *a); extern ASN1_IA5STRING *d2i_ASN1_IA5STRING(ASN1_IA5STRING **a, const unsigned char **in, long len); extern int i2d_ASN1_IA5STRING(const ASN1_IA5STRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_IA5STRING_it(void);
7527 extern ASN1_GENERALSTRING *ASN1_GENERALSTRING_new(void); extern void ASN1_GENERALSTRING_free(ASN1_GENERALSTRING *a); extern ASN1_GENERALSTRING *d2i_ASN1_GENERALSTRING(ASN1_GENERALSTRING **a, const unsigned char **in, long len); extern int i2d_ASN1_GENERALSTRING(const ASN1_GENERALSTRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_GENERALSTRING_it(void);
7528 extern ASN1_UTCTIME *ASN1_UTCTIME_new(void); extern void ASN1_UTCTIME_free(ASN1_UTCTIME *a); extern ASN1_UTCTIME *d2i_ASN1_UTCTIME(ASN1_UTCTIME **a, const unsigned char **in, long len); extern int i2d_ASN1_UTCTIME(const ASN1_UTCTIME *a, unsigned char **out); extern const ASN1_ITEM * ASN1_UTCTIME_it(void);
7529 extern ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_new(void); extern void ASN1_GENERALIZEDTIME_free(ASN1_GENERALIZEDTIME *a); extern ASN1_GENERALIZEDTIME *d2i_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME **a, const unsigned char **in, long len); extern int i2d_ASN1_GENERALIZEDTIME(const ASN1_GENERALIZEDTIME *a, unsigned char **out); extern const ASN1_ITEM * ASN1_GENERALIZEDTIME_it(void);
7530 extern ASN1_TIME *ASN1_TIME_new(void); extern void ASN1_TIME_free(ASN1_TIME *a); extern ASN1_TIME *d2i_ASN1_TIME(ASN1_TIME **a, const unsigned char **in, long len); extern int i2d_ASN1_TIME(const ASN1_TIME *a, unsigned char **out); extern const ASN1_ITEM * ASN1_TIME_it(void);
7531
7532 extern ASN1_TIME *ASN1_TIME_dup(const ASN1_TIME *a);
7533 extern ASN1_UTCTIME *ASN1_UTCTIME_dup(const ASN1_UTCTIME *a);
7534 extern ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_dup(const ASN1_GENERALIZEDTIME *a);
7535
7536 extern const ASN1_ITEM * ASN1_OCTET_STRING_NDEF_it(void);
7537
7538 ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
7539 ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
7540 int offset_day, long offset_sec);
7541 int ASN1_TIME_check(const ASN1_TIME *t);
7542 ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t,
7543 ASN1_GENERALIZEDTIME **out);
7544 int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
7545 int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str);
7546 int ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm);
7547 int ASN1_TIME_normalize(ASN1_TIME *s);
7548 int ASN1_TIME_cmp_time_t(const ASN1_TIME *s, time_t t);
7549 int ASN1_TIME_compare(const ASN1_TIME *a, const ASN1_TIME *b);
7550
7551 int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a);
7552 int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
7553 int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a);
7554 int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
7555 int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a);
7556 int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
7557 int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type);
7558 int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a);
7559
7560 int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
7561 ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
7562 const char *sn, const char *ln);
7563
7564 int ASN1_INTEGER_get_int64(int64_t *pr, const ASN1_INTEGER *a);
7565 int ASN1_INTEGER_set_int64(ASN1_INTEGER *a, int64_t r);
7566 int ASN1_INTEGER_get_uint64(uint64_t *pr, const ASN1_INTEGER *a);
7567 int ASN1_INTEGER_set_uint64(ASN1_INTEGER *a, uint64_t r);
7568
7569 int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
7570 long ASN1_INTEGER_get(const ASN1_INTEGER *a);
7571 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
7572 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
7573
7574 int ASN1_ENUMERATED_get_int64(int64_t *pr, const ASN1_ENUMERATED *a);
7575 int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *a, int64_t r);
7576
7577
7578 int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
7579 long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a);
7580 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai);
7581 BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn);
7582
7583
7584
7585 int ASN1_PRINTABLE_type(const unsigned char *s, int max);
7586
7587 unsigned long ASN1_tag2bit(int tag);
7588
7589
7590 int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
7591 int *pclass, long omax);
7592 int ASN1_check_infinite_end(unsigned char **p, long len);
7593 int ASN1_const_check_infinite_end(const unsigned char **p, long len);
7594 void ASN1_put_object(unsigned char **pp, int constructed, int length,
7595 int tag, int xclass);
7596 int ASN1_put_eoc(unsigned char **pp);
7597 int ASN1_object_size(int constructed, int length, int tag);
7598
7599
7600 void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, const void *x);
7601
7602
7603
7604
7605
7606
7607 void *ASN1_item_dup(const ASN1_ITEM *it, const void *x);
7608 int ASN1_item_sign_ex(const ASN1_ITEM *it, X509_ALGOR *algor1,
7609 X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
7610 const void *data, const ASN1_OCTET_STRING *id,
7611 EVP_PKEY *pkey, const EVP_MD *md, OSSL_LIB_CTX *libctx,
7612 const char *propq);
7613 int ASN1_item_verify_ex(const ASN1_ITEM *it, const X509_ALGOR *alg,
7614 const ASN1_BIT_STRING *signature, const void *data,
7615 const ASN1_OCTET_STRING *id, EVP_PKEY *pkey,
7616 OSSL_LIB_CTX *libctx, const char *propq);
7617 # 932 "include/openssl/asn1.h"
7618 void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);
7619
7620
7621
7622
7623
7624
7625
7626 void *ASN1_item_d2i_fp_ex(const ASN1_ITEM *it, FILE *in, void *x,
7627 OSSL_LIB_CTX *libctx, const char *propq);
7628 void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
7629 int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, const void *x);
7630
7631
7632
7633
7634
7635
7636 int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, const void *x);
7637 int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags);
7638
7639
7640 int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in);
7641
7642 void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
7643
7644
7645
7646
7647
7648
7649
7650 void *ASN1_item_d2i_bio_ex(const ASN1_ITEM *it, BIO *in, void *pval,
7651 OSSL_LIB_CTX *libctx, const char *propq);
7652 void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *pval);
7653 int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, const void *x);
7654
7655
7656
7657
7658
7659
7660 int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, const void *x);
7661 BIO *ASN1_item_i2d_mem_bio(const ASN1_ITEM *it, const ASN1_VALUE *val);
7662 int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
7663 int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
7664 int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm);
7665 int ASN1_TIME_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags);
7666 int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
7667 int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags);
7668 int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int off);
7669 int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
7670 unsigned char *buf, int off);
7671 int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
7672 int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
7673 int dump);
7674 const char *ASN1_tag2str(int tag);
7675
7676
7677
7678 int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
7679
7680 int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
7681 int ASN1_TYPE_get_octetstring(const ASN1_TYPE *a, unsigned char *data, int max_len);
7682 int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
7683 unsigned char *data, int len);
7684 int ASN1_TYPE_get_int_octetstring(const ASN1_TYPE *a, long *num,
7685 unsigned char *data, int max_len);
7686
7687 void *ASN1_item_unpack(const ASN1_STRING *oct, const ASN1_ITEM *it);
7688 void *ASN1_item_unpack_ex(const ASN1_STRING *oct, const ASN1_ITEM *it,
7689 OSSL_LIB_CTX *libctx, const char *propq);
7690
7691 ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
7692 ASN1_OCTET_STRING **oct);
7693
7694 void ASN1_STRING_set_default_mask(unsigned long mask);
7695 int ASN1_STRING_set_default_mask_asc(const char *p);
7696 unsigned long ASN1_STRING_get_default_mask(void);
7697 int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
7698 int inform, unsigned long mask);
7699 int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
7700 int inform, unsigned long mask,
7701 long minsize, long maxsize);
7702
7703 ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
7704 const unsigned char *in, int inlen,
7705 int inform, int nid);
7706 ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
7707 int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
7708 void ASN1_STRING_TABLE_cleanup(void);
7709
7710
7711
7712
7713 ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
7714 ASN1_VALUE *ASN1_item_new_ex(const ASN1_ITEM *it, OSSL_LIB_CTX *libctx,
7715 const char *propq);
7716 void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
7717 ASN1_VALUE *ASN1_item_d2i_ex(ASN1_VALUE **val, const unsigned char **in,
7718 long len, const ASN1_ITEM *it,
7719 OSSL_LIB_CTX *libctx, const char *propq);
7720 ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
7721 long len, const ASN1_ITEM *it);
7722 int ASN1_item_i2d(const ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
7723 int ASN1_item_ndef_i2d(const ASN1_VALUE *val, unsigned char **out,
7724 const ASN1_ITEM *it);
7725
7726 void ASN1_add_oid_module(void);
7727 void ASN1_add_stable_module(void);
7728
7729 ASN1_TYPE *ASN1_generate_nconf(const char *str, CONF *nconf);
7730 ASN1_TYPE *ASN1_generate_v3(const char *str, X509V3_CTX *cnf);
7731 int ASN1_str2mask(const char *str, unsigned long *pmask);
7732 # 1068 "include/openssl/asn1.h"
7733 int ASN1_item_print(BIO *out, const ASN1_VALUE *ifld, int indent,
7734 const ASN1_ITEM *it, const ASN1_PCTX *pctx);
7735 ASN1_PCTX *ASN1_PCTX_new(void);
7736 void ASN1_PCTX_free(ASN1_PCTX *p);
7737 unsigned long ASN1_PCTX_get_flags(const ASN1_PCTX *p);
7738 void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
7739 unsigned long ASN1_PCTX_get_nm_flags(const ASN1_PCTX *p);
7740 void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
7741 unsigned long ASN1_PCTX_get_cert_flags(const ASN1_PCTX *p);
7742 void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
7743 unsigned long ASN1_PCTX_get_oid_flags(const ASN1_PCTX *p);
7744 void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
7745 unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p);
7746 void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
7747
7748 ASN1_SCTX *ASN1_SCTX_new(int (*scan_cb) (ASN1_SCTX *ctx));
7749 void ASN1_SCTX_free(ASN1_SCTX *p);
7750 const ASN1_ITEM *ASN1_SCTX_get_item(ASN1_SCTX *p);
7751 const ASN1_TEMPLATE *ASN1_SCTX_get_template(ASN1_SCTX *p);
7752 unsigned long ASN1_SCTX_get_flags(ASN1_SCTX *p);
7753 void ASN1_SCTX_set_app_data(ASN1_SCTX *p, void *data);
7754 void *ASN1_SCTX_get_app_data(ASN1_SCTX *p);
7755
7756 const BIO_METHOD *BIO_f_asn1(void);
7757
7758
7759 BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
7760
7761 int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
7762 const ASN1_ITEM *it);
7763 int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
7764 const char *hdr, const ASN1_ITEM *it);
7765
7766 int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
7767 int ctype_nid, int econt_nid,
7768 struct stack_st_X509_ALGOR *mdalgs, const ASN1_ITEM *it);
7769 int SMIME_write_ASN1_ex(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
7770 int ctype_nid, int econt_nid,
7771 struct stack_st_X509_ALGOR *mdalgs, const ASN1_ITEM *it,
7772 OSSL_LIB_CTX *libctx, const char *propq);
7773 ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
7774 ASN1_VALUE *SMIME_read_ASN1_ex(BIO *bio, int flags, BIO **bcont,
7775 const ASN1_ITEM *it, ASN1_VALUE **x,
7776 OSSL_LIB_CTX *libctx, const char *propq);
7777 int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
7778 int SMIME_text(BIO *in, BIO *out);
7779
7780 const ASN1_ITEM *ASN1_ITEM_lookup(const char *name);
7781 const ASN1_ITEM *ASN1_ITEM_get(size_t i);
7782 # 27 "include/openssl/dsa.h" 2
7783
7784
7785
7786
7787 # 1 "include/openssl/dh.h" 1
7788 # 12 "include/openssl/dh.h"
7789
7790
7791
7792
7793
7794
7795
7796
7797 # 1 "include/openssl/types.h" 1
7798 # 21 "include/openssl/dh.h" 2
7799 # 38 "include/openssl/dh.h"
7800 int EVP_PKEY_CTX_set_dh_paramgen_type(EVP_PKEY_CTX *ctx, int typ);
7801 int EVP_PKEY_CTX_set_dh_paramgen_gindex(EVP_PKEY_CTX *ctx, int gindex);
7802 int EVP_PKEY_CTX_set_dh_paramgen_seed(EVP_PKEY_CTX *ctx,
7803 const unsigned char *seed,
7804 size_t seedlen);
7805 int EVP_PKEY_CTX_set_dh_paramgen_prime_len(EVP_PKEY_CTX *ctx, int pbits);
7806 int EVP_PKEY_CTX_set_dh_paramgen_subprime_len(EVP_PKEY_CTX *ctx, int qlen);
7807 int EVP_PKEY_CTX_set_dh_paramgen_generator(EVP_PKEY_CTX *ctx, int gen);
7808 int EVP_PKEY_CTX_set_dh_nid(EVP_PKEY_CTX *ctx, int nid);
7809 int EVP_PKEY_CTX_set_dh_rfc5114(EVP_PKEY_CTX *ctx, int gen);
7810 int EVP_PKEY_CTX_set_dhx_rfc5114(EVP_PKEY_CTX *ctx, int gen);
7811 int EVP_PKEY_CTX_set_dh_pad(EVP_PKEY_CTX *ctx, int pad);
7812
7813 int EVP_PKEY_CTX_set_dh_kdf_type(EVP_PKEY_CTX *ctx, int kdf);
7814 int EVP_PKEY_CTX_get_dh_kdf_type(EVP_PKEY_CTX *ctx);
7815 int EVP_PKEY_CTX_set0_dh_kdf_oid(EVP_PKEY_CTX *ctx, ASN1_OBJECT *oid);
7816 int EVP_PKEY_CTX_get0_dh_kdf_oid(EVP_PKEY_CTX *ctx, ASN1_OBJECT **oid);
7817 int EVP_PKEY_CTX_set_dh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
7818 int EVP_PKEY_CTX_get_dh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
7819 int EVP_PKEY_CTX_set_dh_kdf_outlen(EVP_PKEY_CTX *ctx, int len);
7820 int EVP_PKEY_CTX_get_dh_kdf_outlen(EVP_PKEY_CTX *ctx, int *len);
7821 int EVP_PKEY_CTX_set0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char *ukm, int len);
7822
7823 __attribute__((deprecated("Since OpenSSL " "3.0")))
7824 int EVP_PKEY_CTX_get0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **ukm);
7825 # 96 "include/openssl/dh.h"
7826 # 1 "include/openssl/dherr.h" 1
7827 # 13 "include/openssl/dherr.h"
7828
7829 # 97 "include/openssl/dh.h" 2
7830 # 144 "include/openssl/dh.h"
7831 extern const ASN1_ITEM * DHparams_it(void);
7832 # 201 "include/openssl/dh.h"
7833 __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DHparams_dup(const DH *a);
7834
7835 __attribute__((deprecated("Since OpenSSL " "3.0"))) const DH_METHOD *DH_OpenSSL(void);
7836
7837 __attribute__((deprecated("Since OpenSSL " "3.0"))) void DH_set_default_method(const DH_METHOD *meth);
7838 __attribute__((deprecated("Since OpenSSL " "3.0"))) const DH_METHOD *DH_get_default_method(void);
7839 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_set_method(DH *dh, const DH_METHOD *meth);
7840 __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DH_new_method(ENGINE *engine);
7841
7842 __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DH_new(void);
7843 __attribute__((deprecated("Since OpenSSL " "3.0"))) void DH_free(DH *dh);
7844 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_up_ref(DH *dh);
7845 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_bits(const DH *dh);
7846 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_size(const DH *dh);
7847 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_security_bits(const DH *dh);
7848
7849
7850
7851
7852 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_set_ex_data(DH *d, int idx, void *arg);
7853 __attribute__((deprecated("Since OpenSSL " "3.0"))) void *DH_get_ex_data(const DH *d, int idx);
7854
7855 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_generate_parameters_ex(DH *dh, int prime_len,
7856 int generator,
7857 BN_GENCB *cb);
7858
7859 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_check_params_ex(const DH *dh);
7860 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_check_ex(const DH *dh);
7861 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key);
7862 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_check_params(const DH *dh, int *ret);
7863 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_check(const DH *dh, int *codes);
7864 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key,
7865 int *codes);
7866 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_generate_key(DH *dh);
7867 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_compute_key(unsigned char *key,
7868 const BIGNUM *pub_key, DH *dh);
7869 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_compute_key_padded(unsigned char *key,
7870 const BIGNUM *pub_key, DH *dh);
7871
7872 __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *d2i_DHparams(DH **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DHparams(const DH *a, unsigned char **out);
7873 __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *d2i_DHxparams(DH **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DHxparams(const DH *a, unsigned char **out);
7874
7875
7876 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DHparams_print_fp(FILE *fp, const DH *x);
7877
7878 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DHparams_print(BIO *bp, const DH *x);
7879
7880
7881 __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DH_get_1024_160(void);
7882 __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DH_get_2048_224(void);
7883 __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DH_get_2048_256(void);
7884
7885
7886 __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DH_new_by_nid(int nid);
7887 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_get_nid(const DH *dh);
7888
7889
7890 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_KDF_X9_42(unsigned char *out, size_t outlen,
7891 const unsigned char *Z, size_t Zlen,
7892 ASN1_OBJECT *key_oid,
7893 const unsigned char *ukm,
7894 size_t ukmlen, const EVP_MD *md);
7895
7896 __attribute__((deprecated("Since OpenSSL " "3.0"))) void DH_get0_pqg(const DH *dh, const BIGNUM **p,
7897 const BIGNUM **q, const BIGNUM **g);
7898 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
7899 __attribute__((deprecated("Since OpenSSL " "3.0"))) void DH_get0_key(const DH *dh, const BIGNUM **pub_key,
7900 const BIGNUM **priv_key);
7901 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
7902 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DH_get0_p(const DH *dh);
7903 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DH_get0_q(const DH *dh);
7904 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DH_get0_g(const DH *dh);
7905 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DH_get0_priv_key(const DH *dh);
7906 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DH_get0_pub_key(const DH *dh);
7907 __attribute__((deprecated("Since OpenSSL " "3.0"))) void DH_clear_flags(DH *dh, int flags);
7908 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_test_flags(const DH *dh, int flags);
7909 __attribute__((deprecated("Since OpenSSL " "3.0"))) void DH_set_flags(DH *dh, int flags);
7910 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *DH_get0_engine(DH *d);
7911 __attribute__((deprecated("Since OpenSSL " "3.0"))) long DH_get_length(const DH *dh);
7912 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_set_length(DH *dh, long length);
7913
7914 __attribute__((deprecated("Since OpenSSL " "3.0"))) DH_METHOD *DH_meth_new(const char *name, int flags);
7915 __attribute__((deprecated("Since OpenSSL " "3.0"))) void DH_meth_free(DH_METHOD *dhm);
7916 __attribute__((deprecated("Since OpenSSL " "3.0"))) DH_METHOD *DH_meth_dup(const DH_METHOD *dhm);
7917 __attribute__((deprecated("Since OpenSSL " "3.0"))) const char *DH_meth_get0_name(const DH_METHOD *dhm);
7918 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set1_name(DH_METHOD *dhm, const char *name);
7919 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_get_flags(const DH_METHOD *dhm);
7920 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set_flags(DH_METHOD *dhm, int flags);
7921 __attribute__((deprecated("Since OpenSSL " "3.0"))) void *DH_meth_get0_app_data(const DH_METHOD *dhm);
7922 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set0_app_data(DH_METHOD *dhm, void *app_data);
7923 __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DH_meth_get_generate_key(const DH_METHOD *dhm)) (DH *);
7924 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set_generate_key(DH_METHOD *dhm,
7925 int (*generate_key) (DH *));
7926 __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DH_meth_get_compute_key(const DH_METHOD *dhm))
7927 (unsigned char *key,
7928 const BIGNUM *pub_key,
7929 DH *dh);
7930 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set_compute_key(DH_METHOD *dhm,
7931 int (*compute_key)
7932 (unsigned char *key,
7933 const BIGNUM *pub_key,
7934 DH *dh));
7935 __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DH_meth_get_bn_mod_exp(const DH_METHOD *dhm))
7936 (const DH *, BIGNUM *,
7937 const BIGNUM *,
7938 const BIGNUM *,
7939 const BIGNUM *, BN_CTX *,
7940 BN_MONT_CTX *);
7941 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set_bn_mod_exp(DH_METHOD *dhm,
7942 int (*bn_mod_exp)
7943 (const DH *, BIGNUM *,
7944 const BIGNUM *, const BIGNUM *,
7945 const BIGNUM *, BN_CTX *,
7946 BN_MONT_CTX *));
7947 __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *);
7948 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *));
7949 __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DH_meth_get_finish(const DH_METHOD *dhm)) (DH *);
7950 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set_finish(DH_METHOD *dhm, int (*finish) (DH *));
7951 __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DH_meth_get_generate_params(const DH_METHOD *dhm))
7952 (DH *, int, int,
7953 BN_GENCB *);
7954 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set_generate_params(DH_METHOD *dhm,
7955 int (*generate_params)
7956 (DH *, int, int,
7957 BN_GENCB *));
7958
7959
7960
7961 __attribute__((deprecated("Since OpenSSL " "0.9.8"))) DH *DH_generate_parameters(int prime_len, int generator,
7962 void (*callback) (int, int,
7963 void *),
7964 void *cb_arg);
7965 # 32 "include/openssl/dsa.h" 2
7966
7967 # 1 "include/openssl/dsaerr.h" 1
7968 # 13 "include/openssl/dsaerr.h"
7969
7970 # 34 "include/openssl/dsa.h" 2
7971 # 43 "include/openssl/dsa.h"
7972 int EVP_PKEY_CTX_set_dsa_paramgen_bits(EVP_PKEY_CTX *ctx, int nbits);
7973 int EVP_PKEY_CTX_set_dsa_paramgen_q_bits(EVP_PKEY_CTX *ctx, int qbits);
7974 int EVP_PKEY_CTX_set_dsa_paramgen_md_props(EVP_PKEY_CTX *ctx,
7975 const char *md_name,
7976 const char *md_properties);
7977 int EVP_PKEY_CTX_set_dsa_paramgen_gindex(EVP_PKEY_CTX *ctx, int gindex);
7978 int EVP_PKEY_CTX_set_dsa_paramgen_type(EVP_PKEY_CTX *ctx, const char *name);
7979 int EVP_PKEY_CTX_set_dsa_paramgen_seed(EVP_PKEY_CTX *ctx,
7980 const unsigned char *seed,
7981 size_t seedlen);
7982 int EVP_PKEY_CTX_set_dsa_paramgen_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
7983 # 66 "include/openssl/dsa.h"
7984 typedef struct DSA_SIG_st DSA_SIG;
7985 DSA_SIG *DSA_SIG_new(void);
7986 void DSA_SIG_free(DSA_SIG *a);
7987 extern DSA_SIG *d2i_DSA_SIG(DSA_SIG **a, const unsigned char **in, long len); extern int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **out);
7988 void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
7989 int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
7990 # 117 "include/openssl/dsa.h"
7991 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *DSAparams_dup(const DSA *a);
7992 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen,
7993 DSA *dsa);
7994 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_do_verify(const unsigned char *dgst, int dgst_len,
7995 DSA_SIG *sig, DSA *dsa);
7996
7997 __attribute__((deprecated("Since OpenSSL " "3.0"))) const DSA_METHOD *DSA_OpenSSL(void);
7998
7999 __attribute__((deprecated("Since OpenSSL " "3.0"))) void DSA_set_default_method(const DSA_METHOD *);
8000 __attribute__((deprecated("Since OpenSSL " "3.0"))) const DSA_METHOD *DSA_get_default_method(void);
8001 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_set_method(DSA *dsa, const DSA_METHOD *);
8002 __attribute__((deprecated("Since OpenSSL " "3.0"))) const DSA_METHOD *DSA_get_method(DSA *d);
8003
8004 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *DSA_new(void);
8005 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *DSA_new_method(ENGINE *engine);
8006 __attribute__((deprecated("Since OpenSSL " "3.0"))) void DSA_free(DSA *r);
8007
8008 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_up_ref(DSA *r);
8009 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_size(const DSA *);
8010 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_bits(const DSA *d);
8011 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_security_bits(const DSA *d);
8012
8013 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in,
8014 BIGNUM **kinvp, BIGNUM **rp);
8015 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_sign(int type, const unsigned char *dgst,
8016 int dlen, unsigned char *sig,
8017 unsigned int *siglen, DSA *dsa);
8018 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_verify(int type, const unsigned char *dgst,
8019 int dgst_len, const unsigned char *sigbuf,
8020 int siglen, DSA *dsa);
8021
8022
8023
8024 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_set_ex_data(DSA *d, int idx, void *arg);
8025 __attribute__((deprecated("Since OpenSSL " "3.0"))) void *DSA_get_ex_data(const DSA *d, int idx);
8026
8027 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSAPublicKey(const DSA *a, unsigned char **out);
8028
8029 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSAPrivateKey(const DSA *a, unsigned char **out);
8030
8031 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSAparams(DSA **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSAparams(const DSA *a, unsigned char **out);
8032
8033
8034
8035
8036
8037 __attribute__((deprecated("Since OpenSSL " "0.9.8")))
8038 DSA *DSA_generate_parameters(int bits, unsigned char *seed, int seed_len,
8039 int *counter_ret, unsigned long *h_ret,
8040 void (*callback) (int, int, void *),
8041 void *cb_arg);
8042
8043
8044
8045
8046 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_generate_parameters_ex(DSA *dsa, int bits,
8047 const unsigned char *seed,
8048 int seed_len,
8049 int *counter_ret,
8050 unsigned long *h_ret,
8051 BN_GENCB *cb);
8052
8053 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_generate_key(DSA *a);
8054
8055 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSAparams_print(BIO *bp, const DSA *x);
8056 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_print(BIO *bp, const DSA *x, int off);
8057
8058 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSAparams_print_fp(FILE *fp, const DSA *x);
8059 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_print_fp(FILE *bp, const DSA *x, int off);
8060 # 203 "include/openssl/dsa.h"
8061 __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DSA_dup_DH(const DSA *r);
8062
8063
8064 __attribute__((deprecated("Since OpenSSL " "3.0"))) void DSA_get0_pqg(const DSA *d, const BIGNUM **p,
8065 const BIGNUM **q, const BIGNUM **g);
8066 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
8067 __attribute__((deprecated("Since OpenSSL " "3.0"))) void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
8068 const BIGNUM **priv_key);
8069 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_set0_key(DSA *d, BIGNUM *pub_key,
8070 BIGNUM *priv_key);
8071 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DSA_get0_p(const DSA *d);
8072 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DSA_get0_q(const DSA *d);
8073 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DSA_get0_g(const DSA *d);
8074 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DSA_get0_pub_key(const DSA *d);
8075 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DSA_get0_priv_key(const DSA *d);
8076 __attribute__((deprecated("Since OpenSSL " "3.0"))) void DSA_clear_flags(DSA *d, int flags);
8077 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_test_flags(const DSA *d, int flags);
8078 __attribute__((deprecated("Since OpenSSL " "3.0"))) void DSA_set_flags(DSA *d, int flags);
8079 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *DSA_get0_engine(DSA *d);
8080
8081 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA_METHOD *DSA_meth_new(const char *name, int flags);
8082 __attribute__((deprecated("Since OpenSSL " "3.0"))) void DSA_meth_free(DSA_METHOD *dsam);
8083 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA_METHOD *DSA_meth_dup(const DSA_METHOD *dsam);
8084 __attribute__((deprecated("Since OpenSSL " "3.0"))) const char *DSA_meth_get0_name(const DSA_METHOD *dsam);
8085 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set1_name(DSA_METHOD *dsam,
8086 const char *name);
8087 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_get_flags(const DSA_METHOD *dsam);
8088 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_flags(DSA_METHOD *dsam, int flags);
8089 __attribute__((deprecated("Since OpenSSL " "3.0"))) void *DSA_meth_get0_app_data(const DSA_METHOD *dsam);
8090 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set0_app_data(DSA_METHOD *dsam,
8091 void *app_data);
8092 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA_SIG *(*DSA_meth_get_sign(const DSA_METHOD *dsam))
8093 (const unsigned char *, int, DSA *);
8094 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_sign(DSA_METHOD *dsam,
8095 DSA_SIG *(*sign) (const unsigned char *, int, DSA *));
8096 __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_sign_setup(const DSA_METHOD *dsam))
8097 (DSA *, BN_CTX *, BIGNUM **, BIGNUM **);
8098 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_sign_setup(DSA_METHOD *dsam,
8099 int (*sign_setup) (DSA *, BN_CTX *, BIGNUM **, BIGNUM **));
8100 __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_verify(const DSA_METHOD *dsam))
8101 (const unsigned char *, int, DSA_SIG *, DSA *);
8102 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_verify(DSA_METHOD *dsam,
8103 int (*verify) (const unsigned char *, int, DSA_SIG *, DSA *));
8104 __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_mod_exp(const DSA_METHOD *dsam))
8105 (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *,
8106 const BIGNUM *, const BIGNUM *, BN_CTX *, BN_MONT_CTX *);
8107 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_mod_exp(DSA_METHOD *dsam,
8108 int (*mod_exp) (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *,
8109 const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *,
8110 BN_MONT_CTX *));
8111 __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_bn_mod_exp(const DSA_METHOD *dsam))
8112 (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *,
8113 BN_CTX *, BN_MONT_CTX *);
8114 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_bn_mod_exp(DSA_METHOD *dsam,
8115 int (*bn_mod_exp) (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *,
8116 const BIGNUM *, BN_CTX *, BN_MONT_CTX *));
8117 __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_init(const DSA_METHOD *dsam))(DSA *);
8118 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_init(DSA_METHOD *dsam,
8119 int (*init)(DSA *));
8120 __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_finish(const DSA_METHOD *dsam))(DSA *);
8121 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_finish(DSA_METHOD *dsam,
8122 int (*finish)(DSA *));
8123 __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_paramgen(const DSA_METHOD *dsam))
8124 (DSA *, int, const unsigned char *, int, int *, unsigned long *,
8125 BN_GENCB *);
8126 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_paramgen(DSA_METHOD *dsam,
8127 int (*paramgen) (DSA *, int, const unsigned char *, int, int *,
8128 unsigned long *, BN_GENCB *));
8129 __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_keygen(const DSA_METHOD *dsam))(DSA *);
8130 __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_keygen(DSA_METHOD *dsam,
8131 int (*keygen) (DSA *));
8132 # 25 "ssl/ssl_local.h" 2
8133 # 1 "include/openssl/err.h" 1
8134 # 14 "include/openssl/err.h"
8135
8136 # 28 "include/openssl/err.h"
8137 # 1 "include/openssl/types.h" 1
8138 # 29 "include/openssl/err.h" 2
8139
8140 # 1 "include/openssl/lhash.h" 1
8141 # 18 "include/openssl/lhash.h"
8142
8143 # 35 "include/openssl/lhash.h"
8144 typedef struct lhash_node_st OPENSSL_LH_NODE;
8145 typedef int (*OPENSSL_LH_COMPFUNC) (const void *, const void *);
8146 typedef int (*OPENSSL_LH_COMPFUNCTHUNK) (const void *, const void *, OPENSSL_LH_COMPFUNC cfn);
8147 typedef unsigned long (*OPENSSL_LH_HASHFUNC) (const void *);
8148 typedef unsigned long (*OPENSSL_LH_HASHFUNCTHUNK) (const void *, OPENSSL_LH_HASHFUNC hfn);
8149 typedef void (*OPENSSL_LH_DOALL_FUNC) (void *);
8150 typedef void (*OPENSSL_LH_DOALL_FUNC_THUNK) (void *, OPENSSL_LH_DOALL_FUNC doall);
8151 typedef void (*OPENSSL_LH_DOALL_FUNCARG) (void *, void *);
8152 typedef void (*OPENSSL_LH_DOALL_FUNCARG_THUNK) (void *, void *, OPENSSL_LH_DOALL_FUNCARG doall);
8153 typedef struct lhash_st OPENSSL_LHASH;
8154 # 87 "include/openssl/lhash.h"
8155 int OPENSSL_LH_error(OPENSSL_LHASH *lh);
8156 OPENSSL_LHASH *OPENSSL_LH_new(OPENSSL_LH_HASHFUNC h, OPENSSL_LH_COMPFUNC c);
8157 OPENSSL_LHASH *OPENSSL_LH_set_thunks(OPENSSL_LHASH *lh,
8158 OPENSSL_LH_HASHFUNCTHUNK hw,
8159 OPENSSL_LH_COMPFUNCTHUNK cw,
8160 OPENSSL_LH_DOALL_FUNC_THUNK daw,
8161 OPENSSL_LH_DOALL_FUNCARG_THUNK daaw);
8162 void OPENSSL_LH_free(OPENSSL_LHASH *lh);
8163 void OPENSSL_LH_flush(OPENSSL_LHASH *lh);
8164 void *OPENSSL_LH_insert(OPENSSL_LHASH *lh, void *data);
8165 void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data);
8166 void *OPENSSL_LH_retrieve(OPENSSL_LHASH *lh, const void *data);
8167 void OPENSSL_LH_doall(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNC func);
8168 void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh,
8169 OPENSSL_LH_DOALL_FUNCARG func, void *arg);
8170 void OPENSSL_LH_doall_arg_thunk(OPENSSL_LHASH *lh,
8171 OPENSSL_LH_DOALL_FUNCARG_THUNK daaw,
8172 OPENSSL_LH_DOALL_FUNCARG fn, void *arg);
8173
8174 unsigned long OPENSSL_LH_strhash(const char *c);
8175 unsigned long OPENSSL_LH_num_items(const OPENSSL_LHASH *lh);
8176 unsigned long OPENSSL_LH_get_down_load(const OPENSSL_LHASH *lh);
8177 void OPENSSL_LH_set_down_load(OPENSSL_LHASH *lh, unsigned long down_load);
8178
8179
8180
8181 __attribute__((deprecated("Since OpenSSL " "3.1"))) void OPENSSL_LH_stats(const OPENSSL_LHASH *lh, FILE *fp);
8182 __attribute__((deprecated("Since OpenSSL " "3.1"))) void OPENSSL_LH_node_stats(const OPENSSL_LHASH *lh, FILE *fp);
8183 __attribute__((deprecated("Since OpenSSL " "3.1"))) void OPENSSL_LH_node_usage_stats(const OPENSSL_LHASH *lh, FILE *fp);
8184
8185
8186
8187 __attribute__((deprecated("Since OpenSSL " "3.1"))) void OPENSSL_LH_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
8188 __attribute__((deprecated("Since OpenSSL " "3.1"))) void OPENSSL_LH_node_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
8189 __attribute__((deprecated("Since OpenSSL " "3.1"))) void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
8190 # 362 "include/openssl/lhash.h"
8191 struct lhash_st_OPENSSL_STRING { union lh_OPENSSL_STRING_dummy { void* d1; unsigned long d2; int d3; } dummy; }; typedef int (*lh_OPENSSL_STRING_compfunc)(const OPENSSL_STRING *a, const OPENSSL_STRING *b); typedef unsigned long (*lh_OPENSSL_STRING_hashfunc)(const OPENSSL_STRING *a); typedef void (*lh_OPENSSL_STRING_doallfunc)(OPENSSL_STRING *a); static inline unsigned long lh_OPENSSL_STRING_hash_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) { unsigned long (*hfn_conv)(const OPENSSL_STRING *) = (unsigned long (*)(const OPENSSL_STRING *))hfn; return hfn_conv((const OPENSSL_STRING *)data); } static inline int lh_OPENSSL_STRING_comp_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) { int (*cfn_conv)(const OPENSSL_STRING *, const OPENSSL_STRING *) = (int (*)(const OPENSSL_STRING *, const OPENSSL_STRING *))cfn; return cfn_conv((const OPENSSL_STRING *)da, (const OPENSSL_STRING *)db); } static inline void lh_OPENSSL_STRING_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) { void (*doall_conv)(OPENSSL_STRING *) = (void (*)(OPENSSL_STRING *))doall; doall_conv((OPENSSL_STRING *)node); } static inline void lh_OPENSSL_STRING_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) { void (*doall_conv)(OPENSSL_STRING *, void *) = (void (*)(OPENSSL_STRING *, void *))doall; doall_conv((OPENSSL_STRING *)node, arg); } static __attribute__((unused)) inline OPENSSL_STRING * ossl_check_OPENSSL_STRING_lh_plain_type(OPENSSL_STRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STRING * ossl_check_const_OPENSSL_STRING_lh_plain_type(const OPENSSL_STRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_LHASH * ossl_check_const_OPENSSL_STRING_lh_type(const struct lhash_st_OPENSSL_STRING *lh) { return (const OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LHASH * ossl_check_OPENSSL_STRING_lh_type(struct lhash_st_OPENSSL_STRING *lh) { return (OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LH_COMPFUNC ossl_check_OPENSSL_STRING_lh_compfunc_type(lh_OPENSSL_STRING_compfunc cmp) { return (OPENSSL_LH_COMPFUNC)cmp; } static __attribute__((unused)) inline OPENSSL_LH_HASHFUNC ossl_check_OPENSSL_STRING_lh_hashfunc_type(lh_OPENSSL_STRING_hashfunc hfn) { return (OPENSSL_LH_HASHFUNC)hfn; } static __attribute__((unused)) inline OPENSSL_LH_DOALL_FUNC ossl_check_OPENSSL_STRING_lh_doallfunc_type(lh_OPENSSL_STRING_doallfunc dfn) { return (OPENSSL_LH_DOALL_FUNC)dfn; } struct lhash_st_OPENSSL_STRING;
8192 # 377 "include/openssl/lhash.h"
8193 struct lhash_st_OPENSSL_CSTRING { union lh_OPENSSL_CSTRING_dummy { void* d1; unsigned long d2; int d3; } dummy; }; typedef int (*lh_OPENSSL_CSTRING_compfunc)(const OPENSSL_CSTRING *a, const OPENSSL_CSTRING *b); typedef unsigned long (*lh_OPENSSL_CSTRING_hashfunc)(const OPENSSL_CSTRING *a); typedef void (*lh_OPENSSL_CSTRING_doallfunc)(OPENSSL_CSTRING *a); static inline unsigned long lh_OPENSSL_CSTRING_hash_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) { unsigned long (*hfn_conv)(const OPENSSL_CSTRING *) = (unsigned long (*)(const OPENSSL_CSTRING *))hfn; return hfn_conv((const OPENSSL_CSTRING *)data); } static inline int lh_OPENSSL_CSTRING_comp_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) { int (*cfn_conv)(const OPENSSL_CSTRING *, const OPENSSL_CSTRING *) = (int (*)(const OPENSSL_CSTRING *, const OPENSSL_CSTRING *))cfn; return cfn_conv((const OPENSSL_CSTRING *)da, (const OPENSSL_CSTRING *)db); } static inline void lh_OPENSSL_CSTRING_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) { void (*doall_conv)(OPENSSL_CSTRING *) = (void (*)(OPENSSL_CSTRING *))doall; doall_conv((OPENSSL_CSTRING *)node); } static inline void lh_OPENSSL_CSTRING_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) { void (*doall_conv)(OPENSSL_CSTRING *, void *) = (void (*)(OPENSSL_CSTRING *, void *))doall; doall_conv((OPENSSL_CSTRING *)node, arg); } static __attribute__((unused)) inline OPENSSL_CSTRING * ossl_check_OPENSSL_CSTRING_lh_plain_type(OPENSSL_CSTRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_CSTRING * ossl_check_const_OPENSSL_CSTRING_lh_plain_type(const OPENSSL_CSTRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_LHASH * ossl_check_const_OPENSSL_CSTRING_lh_type(const struct lhash_st_OPENSSL_CSTRING *lh) { return (const OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LHASH * ossl_check_OPENSSL_CSTRING_lh_type(struct lhash_st_OPENSSL_CSTRING *lh) { return (OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LH_COMPFUNC ossl_check_OPENSSL_CSTRING_lh_compfunc_type(lh_OPENSSL_CSTRING_compfunc cmp) { return (OPENSSL_LH_COMPFUNC)cmp; } static __attribute__((unused)) inline OPENSSL_LH_HASHFUNC ossl_check_OPENSSL_CSTRING_lh_hashfunc_type(lh_OPENSSL_CSTRING_hashfunc hfn) { return (OPENSSL_LH_HASHFUNC)hfn; } static __attribute__((unused)) inline OPENSSL_LH_DOALL_FUNC ossl_check_OPENSSL_CSTRING_lh_doallfunc_type(lh_OPENSSL_CSTRING_doallfunc dfn) { return (OPENSSL_LH_DOALL_FUNC)dfn; } struct lhash_st_OPENSSL_CSTRING;
8194 # 31 "include/openssl/err.h" 2
8195 # 45 "include/openssl/err.h"
8196 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 1 3 4
8197 # 46 "include/openssl/err.h" 2
8198 # 56 "include/openssl/err.h"
8199 struct err_state_st {
8200 int err_flags[16];
8201 int err_marks[16];
8202 unsigned long err_buffer[16];
8203 char *err_data[16];
8204 size_t err_data_size[16];
8205 int err_data_flags[16];
8206 char *err_file[16];
8207 int err_line[16];
8208 char *err_func[16];
8209 int top, bottom;
8210 };
8211 # 241 "include/openssl/err.h"
8212 static __attribute__((unused)) inline int ERR_GET_LIB(unsigned long errcode)
8213 {
8214 if ((((errcode) & ((unsigned int)0x7fffffff
8215 # 243 "include/openssl/err.h"
8216 + 1)) != 0))
8217 return 2;
8218 return (errcode >> 23L) & 0xFF;
8219 }
8220
8221 static __attribute__((unused)) inline int ERR_GET_RFLAGS(unsigned long errcode)
8222 {
8223 if ((((errcode) & ((unsigned int)0x7fffffff
8224 # 250 "include/openssl/err.h"
8225 + 1)) != 0))
8226 return 0;
8227 return errcode & (0x1F << 18L);
8228 }
8229
8230 static __attribute__((unused)) inline int ERR_GET_REASON(unsigned long errcode)
8231 {
8232 if ((((errcode) & ((unsigned int)0x7fffffff
8233 # 257 "include/openssl/err.h"
8234 + 1)) != 0))
8235 return errcode & ((unsigned int)0x7fffffff
8236 # 258 "include/openssl/err.h"
8237 );
8238 return errcode & 0X7FFFFF;
8239 }
8240
8241 static __attribute__((unused)) inline int ERR_FATAL_ERROR(unsigned long errcode)
8242 {
8243 return (ERR_GET_RFLAGS(errcode) & (0x1 << 18L)) != 0;
8244 }
8245
8246 static __attribute__((unused)) inline int ERR_COMMON_ERROR(unsigned long errcode)
8247 {
8248 return (ERR_GET_RFLAGS(errcode) & (0x2 << 18L)) != 0;
8249 }
8250 # 369 "include/openssl/err.h"
8251 typedef struct ERR_string_data_st {
8252 unsigned long error;
8253 const char *string;
8254 } ERR_STRING_DATA;
8255
8256 struct lhash_st_ERR_STRING_DATA { union lh_ERR_STRING_DATA_dummy { void* d1; unsigned long d2; int d3; } dummy; }; typedef int (*lh_ERR_STRING_DATA_compfunc)(const ERR_STRING_DATA *a, const ERR_STRING_DATA *b); typedef unsigned long (*lh_ERR_STRING_DATA_hashfunc)(const ERR_STRING_DATA *a); typedef void (*lh_ERR_STRING_DATA_doallfunc)(ERR_STRING_DATA *a); static inline unsigned long lh_ERR_STRING_DATA_hash_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) { unsigned long (*hfn_conv)(const ERR_STRING_DATA *) = (unsigned long (*)(const ERR_STRING_DATA *))hfn; return hfn_conv((const ERR_STRING_DATA *)data); } static inline int lh_ERR_STRING_DATA_comp_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) { int (*cfn_conv)(const ERR_STRING_DATA *, const ERR_STRING_DATA *) = (int (*)(const ERR_STRING_DATA *, const ERR_STRING_DATA *))cfn; return cfn_conv((const ERR_STRING_DATA *)da, (const ERR_STRING_DATA *)db); } static inline void lh_ERR_STRING_DATA_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) { void (*doall_conv)(ERR_STRING_DATA *) = (void (*)(ERR_STRING_DATA *))doall; doall_conv((ERR_STRING_DATA *)node); } static inline void lh_ERR_STRING_DATA_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) { void (*doall_conv)(ERR_STRING_DATA *, void *) = (void (*)(ERR_STRING_DATA *, void *))doall; doall_conv((ERR_STRING_DATA *)node, arg); } static __attribute__((unused)) inline ERR_STRING_DATA * ossl_check_ERR_STRING_DATA_lh_plain_type(ERR_STRING_DATA *ptr) { return ptr; } static __attribute__((unused)) inline const ERR_STRING_DATA * ossl_check_const_ERR_STRING_DATA_lh_plain_type(const ERR_STRING_DATA *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_LHASH * ossl_check_const_ERR_STRING_DATA_lh_type(const struct lhash_st_ERR_STRING_DATA *lh) { return (const OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LHASH * ossl_check_ERR_STRING_DATA_lh_type(struct lhash_st_ERR_STRING_DATA *lh) { return (OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LH_COMPFUNC ossl_check_ERR_STRING_DATA_lh_compfunc_type(lh_ERR_STRING_DATA_compfunc cmp) { return (OPENSSL_LH_COMPFUNC)cmp; } static __attribute__((unused)) inline OPENSSL_LH_HASHFUNC ossl_check_ERR_STRING_DATA_lh_hashfunc_type(lh_ERR_STRING_DATA_hashfunc hfn) { return (OPENSSL_LH_HASHFUNC)hfn; } static __attribute__((unused)) inline OPENSSL_LH_DOALL_FUNC ossl_check_ERR_STRING_DATA_lh_doallfunc_type(lh_ERR_STRING_DATA_doallfunc dfn) { return (OPENSSL_LH_DOALL_FUNC)dfn; } struct lhash_st_ERR_STRING_DATA;
8257 # 395 "include/openssl/err.h"
8258 void ERR_new(void);
8259 void ERR_set_debug(const char *file, int line, const char *func);
8260 void ERR_set_error(int lib, int reason, const char *fmt, ...);
8261 void ERR_vset_error(int lib, int reason, const char *fmt, va_list args);
8262 # 415 "include/openssl/err.h"
8263 void ERR_set_error_data(char *data, int flags);
8264
8265 unsigned long ERR_get_error(void);
8266 unsigned long ERR_get_error_all(const char **file, int *line,
8267 const char **func,
8268 const char **data, int *flags);
8269
8270 __attribute__((deprecated("Since OpenSSL " "3.0")))
8271 unsigned long ERR_get_error_line(const char **file, int *line);
8272 __attribute__((deprecated("Since OpenSSL " "3.0")))
8273 unsigned long ERR_get_error_line_data(const char **file, int *line,
8274 const char **data, int *flags);
8275
8276 unsigned long ERR_peek_error(void);
8277 unsigned long ERR_peek_error_line(const char **file, int *line);
8278 unsigned long ERR_peek_error_func(const char **func);
8279 unsigned long ERR_peek_error_data(const char **data, int *flags);
8280 unsigned long ERR_peek_error_all(const char **file, int *line,
8281 const char **func,
8282 const char **data, int *flags);
8283
8284 __attribute__((deprecated("Since OpenSSL " "3.0")))
8285 unsigned long ERR_peek_error_line_data(const char **file, int *line,
8286 const char **data, int *flags);
8287
8288 unsigned long ERR_peek_last_error(void);
8289 unsigned long ERR_peek_last_error_line(const char **file, int *line);
8290 unsigned long ERR_peek_last_error_func(const char **func);
8291 unsigned long ERR_peek_last_error_data(const char **data, int *flags);
8292 unsigned long ERR_peek_last_error_all(const char **file, int *line,
8293 const char **func,
8294 const char **data, int *flags);
8295
8296 __attribute__((deprecated("Since OpenSSL " "3.0")))
8297 unsigned long ERR_peek_last_error_line_data(const char **file, int *line,
8298 const char **data, int *flags);
8299
8300
8301 void ERR_clear_error(void);
8302
8303 char *ERR_error_string(unsigned long e, char *buf);
8304 void ERR_error_string_n(unsigned long e, char *buf, size_t len);
8305 const char *ERR_lib_error_string(unsigned long e);
8306
8307 __attribute__((deprecated("Since OpenSSL " "3.0"))) const char *ERR_func_error_string(unsigned long e);
8308
8309 const char *ERR_reason_error_string(unsigned long e);
8310
8311 void ERR_print_errors_cb(int (*cb) (const char *str, size_t len, void *u),
8312 void *u);
8313
8314 void ERR_print_errors_fp(FILE *fp);
8315
8316 void ERR_print_errors(BIO *bp);
8317
8318 void ERR_add_error_data(int num, ...);
8319 void ERR_add_error_vdata(int num, va_list args);
8320 void ERR_add_error_txt(const char *sepr, const char *txt);
8321 void ERR_add_error_mem_bio(const char *sep, BIO *bio);
8322
8323 int ERR_load_strings(int lib, ERR_STRING_DATA *str);
8324 int ERR_load_strings_const(const ERR_STRING_DATA *str);
8325 int ERR_unload_strings(int lib, ERR_STRING_DATA *str);
8326
8327
8328
8329
8330
8331
8332
8333 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) void ERR_remove_thread_state(void *);
8334
8335
8336 __attribute__((deprecated("Since OpenSSL " "1.0.0"))) void ERR_remove_state(unsigned long pid);
8337
8338
8339 __attribute__((deprecated("Since OpenSSL " "3.0"))) ERR_STATE *ERR_get_state(void);
8340
8341
8342 int ERR_get_next_error_library(void);
8343
8344 int ERR_set_mark(void);
8345 int ERR_pop_to_mark(void);
8346 int ERR_clear_last_mark(void);
8347 int ERR_count_to_mark(void);
8348 int ERR_pop(void);
8349
8350 ERR_STATE *OSSL_ERR_STATE_new(void);
8351 void OSSL_ERR_STATE_save(ERR_STATE *es);
8352 void OSSL_ERR_STATE_save_to_mark(ERR_STATE *es);
8353 void OSSL_ERR_STATE_restore(const ERR_STATE *es);
8354 void OSSL_ERR_STATE_free(ERR_STATE *es);
8355 # 26 "ssl/ssl_local.h" 2
8356 # 1 "include/openssl/ssl.h" 1
8357 # 19 "include/openssl/ssl.h"
8358
8359
8360
8361
8362
8363
8364
8365
8366 # 1 "include/openssl/e_ostime.h" 1
8367 # 12 "include/openssl/e_ostime.h"
8368
8369 # 28 "include/openssl/ssl.h" 2
8370
8371
8372
8373
8374 # 1 "include/openssl/x509.h" 1
8375 # 18 "include/openssl/x509.h"
8376
8377
8378
8379
8380
8381
8382
8383
8384 # 1 "include/openssl/types.h" 1
8385 # 27 "include/openssl/x509.h" 2
8386
8387
8388 # 1 "include/openssl/evp.h" 1
8389 # 12 "include/openssl/evp.h"
8390
8391 # 26 "include/openssl/evp.h"
8392 # 1 "include/openssl/types.h" 1
8393 # 27 "include/openssl/evp.h" 2
8394
8395 # 1 "include/openssl/core_dispatch.h" 1
8396 # 12 "include/openssl/core_dispatch.h"
8397
8398 # 64 "include/openssl/core_dispatch.h"
8399 typedef const OSSL_PARAM * (OSSL_FUNC_core_gettable_params_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_core_gettable_params_fn *OSSL_FUNC_core_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_gettable_params_fn *)opf->function; }
8400
8401
8402 typedef int (OSSL_FUNC_core_get_params_fn)(const OSSL_CORE_HANDLE *prov, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_core_get_params_fn *OSSL_FUNC_core_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_get_params_fn *)opf->function; }
8403
8404
8405 typedef int (OSSL_FUNC_core_thread_start_fn)(const OSSL_CORE_HANDLE *prov, OSSL_thread_stop_handler_fn handfn, void *arg); static __attribute__((unused)) inline OSSL_FUNC_core_thread_start_fn *OSSL_FUNC_core_thread_start(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_thread_start_fn *)opf->function; }
8406
8407
8408
8409 typedef OPENSSL_CORE_CTX * (OSSL_FUNC_core_get_libctx_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_core_get_libctx_fn *OSSL_FUNC_core_get_libctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_get_libctx_fn *)opf->function; }
8410
8411
8412 typedef void (OSSL_FUNC_core_new_error_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_core_new_error_fn *OSSL_FUNC_core_new_error(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_new_error_fn *)opf->function; }
8413
8414 typedef void (OSSL_FUNC_core_set_error_debug_fn)(const OSSL_CORE_HANDLE *prov, const char *file, int line, const char *func); static __attribute__((unused)) inline OSSL_FUNC_core_set_error_debug_fn *OSSL_FUNC_core_set_error_debug(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_set_error_debug_fn *)opf->function; }
8415
8416
8417
8418 typedef void (OSSL_FUNC_core_vset_error_fn)(const OSSL_CORE_HANDLE *prov, uint32_t reason, const char *fmt, va_list args); static __attribute__((unused)) inline OSSL_FUNC_core_vset_error_fn *OSSL_FUNC_core_vset_error(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_vset_error_fn *)opf->function; }
8419
8420
8421
8422 typedef int (OSSL_FUNC_core_set_error_mark_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_core_set_error_mark_fn *OSSL_FUNC_core_set_error_mark(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_set_error_mark_fn *)opf->function; }
8423
8424 typedef int (OSSL_FUNC_core_clear_last_error_mark_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_core_clear_last_error_mark_fn *OSSL_FUNC_core_clear_last_error_mark(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_clear_last_error_mark_fn *)opf->function; }
8425
8426
8427 typedef int (OSSL_FUNC_core_pop_error_to_mark_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_core_pop_error_to_mark_fn *OSSL_FUNC_core_pop_error_to_mark(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_pop_error_to_mark_fn *)opf->function; }
8428
8429
8430
8431
8432
8433
8434
8435 typedef int (OSSL_FUNC_core_obj_add_sigid_fn)(const OSSL_CORE_HANDLE *prov, const char *sign_name, const char *digest_name, const char *pkey_name); static __attribute__((unused)) inline OSSL_FUNC_core_obj_add_sigid_fn *OSSL_FUNC_core_obj_add_sigid(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_obj_add_sigid_fn *)opf->function; }
8436
8437
8438 typedef int (OSSL_FUNC_core_obj_create_fn)(const OSSL_CORE_HANDLE *prov, const char *oid, const char *sn, const char *ln); static __attribute__((unused)) inline OSSL_FUNC_core_obj_create_fn *OSSL_FUNC_core_obj_create(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_obj_create_fn *)opf->function; }
8439
8440
8441
8442
8443
8444 typedef void * (OSSL_FUNC_CRYPTO_malloc_fn)(size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_malloc_fn *OSSL_FUNC_CRYPTO_malloc(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_malloc_fn *)opf->function; }
8445
8446
8447 typedef void * (OSSL_FUNC_CRYPTO_zalloc_fn)(size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_zalloc_fn *OSSL_FUNC_CRYPTO_zalloc(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_zalloc_fn *)opf->function; }
8448
8449
8450 typedef void (OSSL_FUNC_CRYPTO_free_fn)(void *ptr, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_free_fn *OSSL_FUNC_CRYPTO_free(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_free_fn *)opf->function; }
8451
8452
8453 typedef void (OSSL_FUNC_CRYPTO_clear_free_fn)(void *ptr, size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_clear_free_fn *OSSL_FUNC_CRYPTO_clear_free(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_clear_free_fn *)opf->function; }
8454
8455
8456 typedef void * (OSSL_FUNC_CRYPTO_realloc_fn)(void *addr, size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_realloc_fn *OSSL_FUNC_CRYPTO_realloc(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_realloc_fn *)opf->function; }
8457
8458
8459 typedef void * (OSSL_FUNC_CRYPTO_clear_realloc_fn)(void *addr, size_t old_num, size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_clear_realloc_fn *OSSL_FUNC_CRYPTO_clear_realloc(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_clear_realloc_fn *)opf->function; }
8460
8461
8462
8463 typedef void * (OSSL_FUNC_CRYPTO_secure_malloc_fn)(size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_secure_malloc_fn *OSSL_FUNC_CRYPTO_secure_malloc(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_secure_malloc_fn *)opf->function; }
8464
8465
8466 typedef void * (OSSL_FUNC_CRYPTO_secure_zalloc_fn)(size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_secure_zalloc_fn *OSSL_FUNC_CRYPTO_secure_zalloc(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_secure_zalloc_fn *)opf->function; }
8467
8468
8469 typedef void (OSSL_FUNC_CRYPTO_secure_free_fn)(void *ptr, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_secure_free_fn *OSSL_FUNC_CRYPTO_secure_free(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_secure_free_fn *)opf->function; }
8470
8471
8472 typedef void (OSSL_FUNC_CRYPTO_secure_clear_free_fn)(void *ptr, size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_secure_clear_free_fn *OSSL_FUNC_CRYPTO_secure_clear_free(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_secure_clear_free_fn *)opf->function; }
8473
8474
8475
8476 typedef int (OSSL_FUNC_CRYPTO_secure_allocated_fn)(const void *ptr); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_secure_allocated_fn *OSSL_FUNC_CRYPTO_secure_allocated(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_secure_allocated_fn *)opf->function; }
8477
8478
8479 typedef void (OSSL_FUNC_OPENSSL_cleanse_fn)(void *ptr, size_t len); static __attribute__((unused)) inline OSSL_FUNC_OPENSSL_cleanse_fn *OSSL_FUNC_OPENSSL_cleanse(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_OPENSSL_cleanse_fn *)opf->function; }
8480 # 161 "include/openssl/core_dispatch.h"
8481 typedef OSSL_CORE_BIO * (OSSL_FUNC_BIO_new_file_fn)(const char *filename, const char *mode); static __attribute__((unused)) inline OSSL_FUNC_BIO_new_file_fn *OSSL_FUNC_BIO_new_file(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_new_file_fn *)opf->function; }
8482
8483 typedef OSSL_CORE_BIO * (OSSL_FUNC_BIO_new_membuf_fn)(const void *buf, int len); static __attribute__((unused)) inline OSSL_FUNC_BIO_new_membuf_fn *OSSL_FUNC_BIO_new_membuf(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_new_membuf_fn *)opf->function; }
8484 typedef int (OSSL_FUNC_BIO_read_ex_fn)(OSSL_CORE_BIO *bio, void *data, size_t data_len, size_t *bytes_read); static __attribute__((unused)) inline OSSL_FUNC_BIO_read_ex_fn *OSSL_FUNC_BIO_read_ex(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_read_ex_fn *)opf->function; }
8485
8486 typedef int (OSSL_FUNC_BIO_write_ex_fn)(OSSL_CORE_BIO *bio, const void *data, size_t data_len, size_t *written); static __attribute__((unused)) inline OSSL_FUNC_BIO_write_ex_fn *OSSL_FUNC_BIO_write_ex(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_write_ex_fn *)opf->function; }
8487
8488 typedef int (OSSL_FUNC_BIO_gets_fn)(OSSL_CORE_BIO *bio, char *buf, int size); static __attribute__((unused)) inline OSSL_FUNC_BIO_gets_fn *OSSL_FUNC_BIO_gets(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_gets_fn *)opf->function; }
8489 typedef int (OSSL_FUNC_BIO_puts_fn)(OSSL_CORE_BIO *bio, const char *str); static __attribute__((unused)) inline OSSL_FUNC_BIO_puts_fn *OSSL_FUNC_BIO_puts(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_puts_fn *)opf->function; }
8490 typedef int (OSSL_FUNC_BIO_up_ref_fn)(OSSL_CORE_BIO *bio); static __attribute__((unused)) inline OSSL_FUNC_BIO_up_ref_fn *OSSL_FUNC_BIO_up_ref(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_up_ref_fn *)opf->function; }
8491 typedef int (OSSL_FUNC_BIO_free_fn)(OSSL_CORE_BIO *bio); static __attribute__((unused)) inline OSSL_FUNC_BIO_free_fn *OSSL_FUNC_BIO_free(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_free_fn *)opf->function; }
8492 typedef int (OSSL_FUNC_BIO_vprintf_fn)(OSSL_CORE_BIO *bio, const char *format, va_list args); static __attribute__((unused)) inline OSSL_FUNC_BIO_vprintf_fn *OSSL_FUNC_BIO_vprintf(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_vprintf_fn *)opf->function; }
8493
8494 typedef int (OSSL_FUNC_BIO_vsnprintf_fn)(char *buf, size_t n, const char *fmt, va_list args); static __attribute__((unused)) inline OSSL_FUNC_BIO_vsnprintf_fn *OSSL_FUNC_BIO_vsnprintf(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_vsnprintf_fn *)opf->function; }
8495
8496 typedef int (OSSL_FUNC_BIO_ctrl_fn)(OSSL_CORE_BIO *bio, int cmd, long num, void *ptr); static __attribute__((unused)) inline OSSL_FUNC_BIO_ctrl_fn *OSSL_FUNC_BIO_ctrl(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_ctrl_fn *)opf->function; }
8497 # 186 "include/openssl/core_dispatch.h"
8498 typedef void (OSSL_FUNC_self_test_cb_fn)(OPENSSL_CORE_CTX *ctx, OSSL_CALLBACK **cb, void **cbarg); static __attribute__((unused)) inline OSSL_FUNC_self_test_cb_fn *OSSL_FUNC_self_test_cb(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_self_test_cb_fn *)opf->function; }
8499
8500
8501
8502
8503
8504
8505
8506 typedef size_t (OSSL_FUNC_get_entropy_fn)(const OSSL_CORE_HANDLE *handle, unsigned char **pout, int entropy, size_t min_len, size_t max_len); static __attribute__((unused)) inline OSSL_FUNC_get_entropy_fn *OSSL_FUNC_get_entropy(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_get_entropy_fn *)opf->function; }
8507
8508
8509 typedef size_t (OSSL_FUNC_get_user_entropy_fn)(const OSSL_CORE_HANDLE *handle, unsigned char **pout, int entropy, size_t min_len, size_t max_len); static __attribute__((unused)) inline OSSL_FUNC_get_user_entropy_fn *OSSL_FUNC_get_user_entropy(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_get_user_entropy_fn *)opf->function; }
8510
8511
8512 typedef void (OSSL_FUNC_cleanup_entropy_fn)(const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len); static __attribute__((unused)) inline OSSL_FUNC_cleanup_entropy_fn *OSSL_FUNC_cleanup_entropy(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cleanup_entropy_fn *)opf->function; }
8513
8514 typedef void (OSSL_FUNC_cleanup_user_entropy_fn)(const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len); static __attribute__((unused)) inline OSSL_FUNC_cleanup_user_entropy_fn *OSSL_FUNC_cleanup_user_entropy(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cleanup_user_entropy_fn *)opf->function; }
8515
8516 typedef size_t (OSSL_FUNC_get_nonce_fn)(const OSSL_CORE_HANDLE *handle, unsigned char **pout, size_t min_len, size_t max_len, const void *salt, size_t salt_len); static __attribute__((unused)) inline OSSL_FUNC_get_nonce_fn *OSSL_FUNC_get_nonce(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_get_nonce_fn *)opf->function; }
8517
8518
8519
8520 typedef size_t (OSSL_FUNC_get_user_nonce_fn)(const OSSL_CORE_HANDLE *handle, unsigned char **pout, size_t min_len, size_t max_len, const void *salt, size_t salt_len); static __attribute__((unused)) inline OSSL_FUNC_get_user_nonce_fn *OSSL_FUNC_get_user_nonce(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_get_user_nonce_fn *)opf->function; }
8521
8522
8523
8524 typedef void (OSSL_FUNC_cleanup_nonce_fn)(const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len); static __attribute__((unused)) inline OSSL_FUNC_cleanup_nonce_fn *OSSL_FUNC_cleanup_nonce(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cleanup_nonce_fn *)opf->function; }
8525
8526 typedef void (OSSL_FUNC_cleanup_user_nonce_fn)(const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len); static __attribute__((unused)) inline OSSL_FUNC_cleanup_user_nonce_fn *OSSL_FUNC_cleanup_user_nonce(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cleanup_user_nonce_fn *)opf->function; }
8527 # 226 "include/openssl/core_dispatch.h"
8528 typedef int (OSSL_FUNC_provider_register_child_cb_fn)(const OSSL_CORE_HANDLE *handle, int (*create_cb)(const OSSL_CORE_HANDLE *provider, void *cbdata), int (*remove_cb)(const OSSL_CORE_HANDLE *provider, void *cbdata), int (*global_props_cb)(const char *props, void *cbdata), void *cbdata); static __attribute__((unused)) inline OSSL_FUNC_provider_register_child_cb_fn *OSSL_FUNC_provider_register_child_cb(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_register_child_cb_fn *)opf->function; }
8529
8530
8531
8532
8533
8534 typedef void (OSSL_FUNC_provider_deregister_child_cb_fn)(const OSSL_CORE_HANDLE *handle); static __attribute__((unused)) inline OSSL_FUNC_provider_deregister_child_cb_fn *OSSL_FUNC_provider_deregister_child_cb(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_deregister_child_cb_fn *)opf->function; }
8535
8536 typedef const char * (OSSL_FUNC_provider_name_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_provider_name_fn *OSSL_FUNC_provider_name(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_name_fn *)opf->function; }
8537
8538 typedef void * (OSSL_FUNC_provider_get0_provider_ctx_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_provider_get0_provider_ctx_fn *OSSL_FUNC_provider_get0_provider_ctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_get0_provider_ctx_fn *)opf->function; }
8539
8540 typedef const OSSL_DISPATCH * (OSSL_FUNC_provider_get0_dispatch_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_provider_get0_dispatch_fn *OSSL_FUNC_provider_get0_dispatch(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_get0_dispatch_fn *)opf->function; }
8541
8542 typedef int (OSSL_FUNC_provider_up_ref_fn)(const OSSL_CORE_HANDLE *prov, int activate); static __attribute__((unused)) inline OSSL_FUNC_provider_up_ref_fn *OSSL_FUNC_provider_up_ref(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_up_ref_fn *)opf->function; }
8543
8544 typedef int (OSSL_FUNC_provider_free_fn)(const OSSL_CORE_HANDLE *prov, int deactivate); static __attribute__((unused)) inline OSSL_FUNC_provider_free_fn *OSSL_FUNC_provider_free(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_free_fn *)opf->function; }
8545
8546
8547
8548
8549 typedef void (OSSL_FUNC_provider_teardown_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_provider_teardown_fn *OSSL_FUNC_provider_teardown(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_teardown_fn *)opf->function; }
8550
8551 typedef const OSSL_PARAM * (OSSL_FUNC_provider_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_provider_gettable_params_fn *OSSL_FUNC_provider_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_gettable_params_fn *)opf->function; }
8552
8553
8554 typedef int (OSSL_FUNC_provider_get_params_fn)(void *provctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_provider_get_params_fn *OSSL_FUNC_provider_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_get_params_fn *)opf->function; }
8555
8556
8557 typedef const OSSL_ALGORITHM * (OSSL_FUNC_provider_query_operation_fn)(void *provctx, int operation_id, int *no_store); static __attribute__((unused)) inline OSSL_FUNC_provider_query_operation_fn *OSSL_FUNC_provider_query_operation(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_query_operation_fn *)opf->function; }
8558
8559
8560 typedef void (OSSL_FUNC_provider_unquery_operation_fn)(void *provctx, int operation_id, const OSSL_ALGORITHM *); static __attribute__((unused)) inline OSSL_FUNC_provider_unquery_operation_fn *OSSL_FUNC_provider_unquery_operation(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_unquery_operation_fn *)opf->function; }
8561
8562
8563 typedef const OSSL_ITEM * (OSSL_FUNC_provider_get_reason_strings_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_provider_get_reason_strings_fn *OSSL_FUNC_provider_get_reason_strings(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_get_reason_strings_fn *)opf->function; }
8564
8565
8566 typedef int (OSSL_FUNC_provider_get_capabilities_fn)(void *provctx, const char *capability, OSSL_CALLBACK *cb, void *arg); static __attribute__((unused)) inline OSSL_FUNC_provider_get_capabilities_fn *OSSL_FUNC_provider_get_capabilities(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_get_capabilities_fn *)opf->function; }
8567
8568
8569 typedef int (OSSL_FUNC_provider_self_test_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_provider_self_test_fn *OSSL_FUNC_provider_self_test(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_self_test_fn *)opf->function; }
8570 # 305 "include/openssl/core_dispatch.h"
8571 typedef void * (OSSL_FUNC_digest_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_digest_newctx_fn *OSSL_FUNC_digest_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_newctx_fn *)opf->function; }
8572 typedef int (OSSL_FUNC_digest_init_fn)(void *dctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_digest_init_fn *OSSL_FUNC_digest_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_init_fn *)opf->function; }
8573 typedef int (OSSL_FUNC_digest_update_fn)(void *dctx, const unsigned char *in, size_t inl); static __attribute__((unused)) inline OSSL_FUNC_digest_update_fn *OSSL_FUNC_digest_update(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_update_fn *)opf->function; }
8574
8575 typedef int (OSSL_FUNC_digest_final_fn)(void *dctx, unsigned char *out, size_t *outl, size_t outsz); static __attribute__((unused)) inline OSSL_FUNC_digest_final_fn *OSSL_FUNC_digest_final(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_final_fn *)opf->function; }
8576
8577
8578 typedef int (OSSL_FUNC_digest_squeeze_fn)(void *dctx, unsigned char *out, size_t *outl, size_t outsz); static __attribute__((unused)) inline OSSL_FUNC_digest_squeeze_fn *OSSL_FUNC_digest_squeeze(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_squeeze_fn *)opf->function; }
8579
8580
8581 typedef int (OSSL_FUNC_digest_digest_fn)(void *provctx, const unsigned char *in, size_t inl, unsigned char *out, size_t *outl, size_t outsz); static __attribute__((unused)) inline OSSL_FUNC_digest_digest_fn *OSSL_FUNC_digest_digest(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_digest_fn *)opf->function; }
8582
8583
8584
8585 typedef void (OSSL_FUNC_digest_freectx_fn)(void *dctx); static __attribute__((unused)) inline OSSL_FUNC_digest_freectx_fn *OSSL_FUNC_digest_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_freectx_fn *)opf->function; }
8586 typedef void * (OSSL_FUNC_digest_dupctx_fn)(void *dctx); static __attribute__((unused)) inline OSSL_FUNC_digest_dupctx_fn *OSSL_FUNC_digest_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_dupctx_fn *)opf->function; }
8587
8588 typedef int (OSSL_FUNC_digest_get_params_fn)(OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_digest_get_params_fn *OSSL_FUNC_digest_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_get_params_fn *)opf->function; }
8589 typedef int (OSSL_FUNC_digest_set_ctx_params_fn)(void *vctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_digest_set_ctx_params_fn *OSSL_FUNC_digest_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_set_ctx_params_fn *)opf->function; }
8590
8591 typedef int (OSSL_FUNC_digest_get_ctx_params_fn)(void *vctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_digest_get_ctx_params_fn *OSSL_FUNC_digest_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_get_ctx_params_fn *)opf->function; }
8592
8593 typedef const OSSL_PARAM * (OSSL_FUNC_digest_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_digest_gettable_params_fn *OSSL_FUNC_digest_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_gettable_params_fn *)opf->function; }
8594
8595 typedef const OSSL_PARAM * (OSSL_FUNC_digest_settable_ctx_params_fn)(void *dctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_digest_settable_ctx_params_fn *OSSL_FUNC_digest_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_settable_ctx_params_fn *)opf->function; }
8596
8597 typedef const OSSL_PARAM * (OSSL_FUNC_digest_gettable_ctx_params_fn)(void *dctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_digest_gettable_ctx_params_fn *OSSL_FUNC_digest_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_gettable_ctx_params_fn *)opf->function; }
8598 # 351 "include/openssl/core_dispatch.h"
8599 typedef void * (OSSL_FUNC_cipher_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_cipher_newctx_fn *OSSL_FUNC_cipher_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_newctx_fn *)opf->function; }
8600 typedef int (OSSL_FUNC_cipher_encrypt_init_fn)(void *cctx, const unsigned char *key, size_t keylen, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_cipher_encrypt_init_fn *OSSL_FUNC_cipher_encrypt_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_encrypt_init_fn *)opf->function; }
8601
8602
8603
8604
8605
8606 typedef int (OSSL_FUNC_cipher_decrypt_init_fn)(void *cctx, const unsigned char *key, size_t keylen, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_cipher_decrypt_init_fn *OSSL_FUNC_cipher_decrypt_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_decrypt_init_fn *)opf->function; }
8607
8608
8609
8610
8611
8612 typedef int (OSSL_FUNC_cipher_update_fn)(void *cctx, unsigned char *out, size_t *outl, size_t outsize, const unsigned char *in, size_t inl); static __attribute__((unused)) inline OSSL_FUNC_cipher_update_fn *OSSL_FUNC_cipher_update(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_update_fn *)opf->function; }
8613
8614
8615
8616 typedef int (OSSL_FUNC_cipher_final_fn)(void *cctx, unsigned char *out, size_t *outl, size_t outsize); static __attribute__((unused)) inline OSSL_FUNC_cipher_final_fn *OSSL_FUNC_cipher_final(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_final_fn *)opf->function; }
8617
8618
8619 typedef int (OSSL_FUNC_cipher_cipher_fn)(void *cctx, unsigned char *out, size_t *outl, size_t outsize, const unsigned char *in, size_t inl); static __attribute__((unused)) inline OSSL_FUNC_cipher_cipher_fn *OSSL_FUNC_cipher_cipher(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_cipher_fn *)opf->function; }
8620
8621
8622
8623 typedef void (OSSL_FUNC_cipher_freectx_fn)(void *cctx); static __attribute__((unused)) inline OSSL_FUNC_cipher_freectx_fn *OSSL_FUNC_cipher_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_freectx_fn *)opf->function; }
8624 typedef void * (OSSL_FUNC_cipher_dupctx_fn)(void *cctx); static __attribute__((unused)) inline OSSL_FUNC_cipher_dupctx_fn *OSSL_FUNC_cipher_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_dupctx_fn *)opf->function; }
8625 typedef int (OSSL_FUNC_cipher_get_params_fn)(OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_cipher_get_params_fn *OSSL_FUNC_cipher_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_get_params_fn *)opf->function; }
8626 typedef int (OSSL_FUNC_cipher_get_ctx_params_fn)(void *cctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_cipher_get_ctx_params_fn *OSSL_FUNC_cipher_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_get_ctx_params_fn *)opf->function; }
8627
8628 typedef int (OSSL_FUNC_cipher_set_ctx_params_fn)(void *cctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_cipher_set_ctx_params_fn *OSSL_FUNC_cipher_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_set_ctx_params_fn *)opf->function; }
8629
8630 typedef const OSSL_PARAM * (OSSL_FUNC_cipher_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_cipher_gettable_params_fn *OSSL_FUNC_cipher_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_gettable_params_fn *)opf->function; }
8631
8632 typedef const OSSL_PARAM * (OSSL_FUNC_cipher_settable_ctx_params_fn)(void *cctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_cipher_settable_ctx_params_fn *OSSL_FUNC_cipher_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_settable_ctx_params_fn *)opf->function; }
8633
8634 typedef const OSSL_PARAM * (OSSL_FUNC_cipher_gettable_ctx_params_fn)(void *cctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_cipher_gettable_ctx_params_fn *OSSL_FUNC_cipher_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_gettable_ctx_params_fn *)opf->function; }
8635 # 404 "include/openssl/core_dispatch.h"
8636 typedef void * (OSSL_FUNC_mac_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_mac_newctx_fn *OSSL_FUNC_mac_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_newctx_fn *)opf->function; }
8637 typedef void * (OSSL_FUNC_mac_dupctx_fn)(void *src); static __attribute__((unused)) inline OSSL_FUNC_mac_dupctx_fn *OSSL_FUNC_mac_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_dupctx_fn *)opf->function; }
8638 typedef void (OSSL_FUNC_mac_freectx_fn)(void *mctx); static __attribute__((unused)) inline OSSL_FUNC_mac_freectx_fn *OSSL_FUNC_mac_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_freectx_fn *)opf->function; }
8639 typedef int (OSSL_FUNC_mac_init_fn)(void *mctx, const unsigned char *key, size_t keylen, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_mac_init_fn *OSSL_FUNC_mac_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_init_fn *)opf->function; }
8640
8641 typedef int (OSSL_FUNC_mac_update_fn)(void *mctx, const unsigned char *in, size_t inl); static __attribute__((unused)) inline OSSL_FUNC_mac_update_fn *OSSL_FUNC_mac_update(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_update_fn *)opf->function; }
8642
8643 typedef int (OSSL_FUNC_mac_final_fn)(void *mctx, unsigned char *out, size_t *outl, size_t outsize); static __attribute__((unused)) inline OSSL_FUNC_mac_final_fn *OSSL_FUNC_mac_final(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_final_fn *)opf->function; }
8644
8645
8646 typedef const OSSL_PARAM * (OSSL_FUNC_mac_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_mac_gettable_params_fn *OSSL_FUNC_mac_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_gettable_params_fn *)opf->function; }
8647 typedef const OSSL_PARAM * (OSSL_FUNC_mac_gettable_ctx_params_fn)(void *mctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_mac_gettable_ctx_params_fn *OSSL_FUNC_mac_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_gettable_ctx_params_fn *)opf->function; }
8648
8649 typedef const OSSL_PARAM * (OSSL_FUNC_mac_settable_ctx_params_fn)(void *mctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_mac_settable_ctx_params_fn *OSSL_FUNC_mac_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_settable_ctx_params_fn *)opf->function; }
8650
8651 typedef int (OSSL_FUNC_mac_get_params_fn)(OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_mac_get_params_fn *OSSL_FUNC_mac_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_get_params_fn *)opf->function; }
8652 typedef int (OSSL_FUNC_mac_get_ctx_params_fn)(void *mctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_mac_get_ctx_params_fn *OSSL_FUNC_mac_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_get_ctx_params_fn *)opf->function; }
8653
8654 typedef int (OSSL_FUNC_mac_set_ctx_params_fn)(void *mctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_mac_set_ctx_params_fn *OSSL_FUNC_mac_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_set_ctx_params_fn *)opf->function; }
8655 # 439 "include/openssl/core_dispatch.h"
8656 typedef void * (OSSL_FUNC_kdf_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_kdf_newctx_fn *OSSL_FUNC_kdf_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_newctx_fn *)opf->function; }
8657 typedef void * (OSSL_FUNC_kdf_dupctx_fn)(void *src); static __attribute__((unused)) inline OSSL_FUNC_kdf_dupctx_fn *OSSL_FUNC_kdf_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_dupctx_fn *)opf->function; }
8658 typedef void (OSSL_FUNC_kdf_freectx_fn)(void *kctx); static __attribute__((unused)) inline OSSL_FUNC_kdf_freectx_fn *OSSL_FUNC_kdf_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_freectx_fn *)opf->function; }
8659 typedef void (OSSL_FUNC_kdf_reset_fn)(void *kctx); static __attribute__((unused)) inline OSSL_FUNC_kdf_reset_fn *OSSL_FUNC_kdf_reset(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_reset_fn *)opf->function; }
8660 typedef int (OSSL_FUNC_kdf_derive_fn)(void *kctx, unsigned char *key, size_t keylen, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kdf_derive_fn *OSSL_FUNC_kdf_derive(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_derive_fn *)opf->function; }
8661
8662 typedef const OSSL_PARAM * (OSSL_FUNC_kdf_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_kdf_gettable_params_fn *OSSL_FUNC_kdf_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_gettable_params_fn *)opf->function; }
8663 typedef const OSSL_PARAM * (OSSL_FUNC_kdf_gettable_ctx_params_fn)(void *kctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_kdf_gettable_ctx_params_fn *OSSL_FUNC_kdf_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_gettable_ctx_params_fn *)opf->function; }
8664
8665 typedef const OSSL_PARAM * (OSSL_FUNC_kdf_settable_ctx_params_fn)(void *kctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_kdf_settable_ctx_params_fn *OSSL_FUNC_kdf_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_settable_ctx_params_fn *)opf->function; }
8666
8667 typedef int (OSSL_FUNC_kdf_get_params_fn)(OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kdf_get_params_fn *OSSL_FUNC_kdf_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_get_params_fn *)opf->function; }
8668 typedef int (OSSL_FUNC_kdf_get_ctx_params_fn)(void *kctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kdf_get_ctx_params_fn *OSSL_FUNC_kdf_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_get_ctx_params_fn *)opf->function; }
8669
8670 typedef int (OSSL_FUNC_kdf_set_ctx_params_fn)(void *kctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kdf_set_ctx_params_fn *OSSL_FUNC_kdf_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_set_ctx_params_fn *)opf->function; }
8671 # 478 "include/openssl/core_dispatch.h"
8672 typedef void * (OSSL_FUNC_rand_newctx_fn)(void *provctx, void *parent, const OSSL_DISPATCH *parent_calls); static __attribute__((unused)) inline OSSL_FUNC_rand_newctx_fn *OSSL_FUNC_rand_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_newctx_fn *)opf->function; }
8673
8674
8675 typedef void (OSSL_FUNC_rand_freectx_fn)(void *vctx); static __attribute__((unused)) inline OSSL_FUNC_rand_freectx_fn *OSSL_FUNC_rand_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_freectx_fn *)opf->function; }
8676 typedef int (OSSL_FUNC_rand_instantiate_fn)(void *vdrbg, unsigned int strength, int prediction_resistance, const unsigned char *pstr, size_t pstr_len, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_rand_instantiate_fn *OSSL_FUNC_rand_instantiate(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_instantiate_fn *)opf->function; }
8677
8678
8679
8680
8681 typedef int (OSSL_FUNC_rand_uninstantiate_fn)(void *vdrbg); static __attribute__((unused)) inline OSSL_FUNC_rand_uninstantiate_fn *OSSL_FUNC_rand_uninstantiate(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_uninstantiate_fn *)opf->function; }
8682 typedef int (OSSL_FUNC_rand_generate_fn)(void *vctx, unsigned char *out, size_t outlen, unsigned int strength, int prediction_resistance, const unsigned char *addin, size_t addin_len); static __attribute__((unused)) inline OSSL_FUNC_rand_generate_fn *OSSL_FUNC_rand_generate(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_generate_fn *)opf->function; }
8683
8684
8685
8686 typedef int (OSSL_FUNC_rand_reseed_fn)(void *vctx, int prediction_resistance, const unsigned char *ent, size_t ent_len, const unsigned char *addin, size_t addin_len); static __attribute__((unused)) inline OSSL_FUNC_rand_reseed_fn *OSSL_FUNC_rand_reseed(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_reseed_fn *)opf->function; }
8687
8688
8689
8690 typedef size_t (OSSL_FUNC_rand_nonce_fn)(void *vctx, unsigned char *out, unsigned int strength, size_t min_noncelen, size_t max_noncelen); static __attribute__((unused)) inline OSSL_FUNC_rand_nonce_fn *OSSL_FUNC_rand_nonce(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_nonce_fn *)opf->function; }
8691
8692
8693 typedef int (OSSL_FUNC_rand_enable_locking_fn)(void *vctx); static __attribute__((unused)) inline OSSL_FUNC_rand_enable_locking_fn *OSSL_FUNC_rand_enable_locking(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_enable_locking_fn *)opf->function; }
8694 typedef int (OSSL_FUNC_rand_lock_fn)(void *vctx); static __attribute__((unused)) inline OSSL_FUNC_rand_lock_fn *OSSL_FUNC_rand_lock(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_lock_fn *)opf->function; }
8695 typedef void (OSSL_FUNC_rand_unlock_fn)(void *vctx); static __attribute__((unused)) inline OSSL_FUNC_rand_unlock_fn *OSSL_FUNC_rand_unlock(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_unlock_fn *)opf->function; }
8696 typedef const OSSL_PARAM * (OSSL_FUNC_rand_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_rand_gettable_params_fn *OSSL_FUNC_rand_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_gettable_params_fn *)opf->function; }
8697 typedef const OSSL_PARAM * (OSSL_FUNC_rand_gettable_ctx_params_fn)(void *vctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_rand_gettable_ctx_params_fn *OSSL_FUNC_rand_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_gettable_ctx_params_fn *)opf->function; }
8698
8699 typedef const OSSL_PARAM * (OSSL_FUNC_rand_settable_ctx_params_fn)(void *vctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_rand_settable_ctx_params_fn *OSSL_FUNC_rand_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_settable_ctx_params_fn *)opf->function; }
8700
8701 typedef int (OSSL_FUNC_rand_get_params_fn)(OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_rand_get_params_fn *OSSL_FUNC_rand_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_get_params_fn *)opf->function; }
8702 typedef int (OSSL_FUNC_rand_get_ctx_params_fn)(void *vctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_rand_get_ctx_params_fn *OSSL_FUNC_rand_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_get_ctx_params_fn *)opf->function; }
8703
8704 typedef int (OSSL_FUNC_rand_set_ctx_params_fn)(void *vctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_rand_set_ctx_params_fn *OSSL_FUNC_rand_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_set_ctx_params_fn *)opf->function; }
8705
8706 typedef void (OSSL_FUNC_rand_set_callbacks_fn)(void *vctx, OSSL_INOUT_CALLBACK *get_entropy, OSSL_CALLBACK *cleanup_entropy, OSSL_INOUT_CALLBACK *get_nonce, OSSL_CALLBACK *cleanup_nonce, void *arg); static __attribute__((unused)) inline OSSL_FUNC_rand_set_callbacks_fn *OSSL_FUNC_rand_set_callbacks(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_set_callbacks_fn *)opf->function; }
8707
8708
8709
8710
8711 typedef int (OSSL_FUNC_rand_verify_zeroization_fn)(void *vctx); static __attribute__((unused)) inline OSSL_FUNC_rand_verify_zeroization_fn *OSSL_FUNC_rand_verify_zeroization(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_verify_zeroization_fn *)opf->function; }
8712
8713 typedef size_t (OSSL_FUNC_rand_get_seed_fn)(void *vctx, unsigned char **buffer, int entropy, size_t min_len, size_t max_len, int prediction_resistance, const unsigned char *adin, size_t adin_len); static __attribute__((unused)) inline OSSL_FUNC_rand_get_seed_fn *OSSL_FUNC_rand_get_seed(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_get_seed_fn *)opf->function; }
8714
8715
8716
8717
8718 typedef void (OSSL_FUNC_rand_clear_seed_fn)(void *vctx, unsigned char *buffer, size_t b_len); static __attribute__((unused)) inline OSSL_FUNC_rand_clear_seed_fn *OSSL_FUNC_rand_clear_seed(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_clear_seed_fn *)opf->function; }
8719 # 582 "include/openssl/core_dispatch.h"
8720 typedef void * (OSSL_FUNC_keymgmt_new_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_new_fn *OSSL_FUNC_keymgmt_new(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_new_fn *)opf->function; }
8721 # 591 "include/openssl/core_dispatch.h"
8722 typedef void * (OSSL_FUNC_keymgmt_gen_init_fn)(void *provctx, int selection, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_gen_init_fn *OSSL_FUNC_keymgmt_gen_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_gen_init_fn *)opf->function; }
8723
8724 typedef int (OSSL_FUNC_keymgmt_gen_set_template_fn)(void *genctx, void *templ); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_gen_set_template_fn *OSSL_FUNC_keymgmt_gen_set_template(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_gen_set_template_fn *)opf->function; }
8725
8726 typedef int (OSSL_FUNC_keymgmt_gen_set_params_fn)(void *genctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_gen_set_params_fn *OSSL_FUNC_keymgmt_gen_set_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_gen_set_params_fn *)opf->function; }
8727
8728 typedef const OSSL_PARAM * (OSSL_FUNC_keymgmt_gen_settable_params_fn)(void *genctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_gen_settable_params_fn *OSSL_FUNC_keymgmt_gen_settable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_gen_settable_params_fn *)opf->function; }
8729
8730
8731 typedef void * (OSSL_FUNC_keymgmt_gen_fn)(void *genctx, OSSL_CALLBACK *cb, void *cbarg); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_gen_fn *OSSL_FUNC_keymgmt_gen(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_gen_fn *)opf->function; }
8732
8733 typedef void (OSSL_FUNC_keymgmt_gen_cleanup_fn)(void *genctx); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_gen_cleanup_fn *OSSL_FUNC_keymgmt_gen_cleanup(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_gen_cleanup_fn *)opf->function; }
8734
8735
8736
8737 typedef void * (OSSL_FUNC_keymgmt_load_fn)(const void *reference, size_t reference_sz); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_load_fn *OSSL_FUNC_keymgmt_load(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_load_fn *)opf->function; }
8738
8739
8740
8741
8742 typedef void (OSSL_FUNC_keymgmt_free_fn)(void *keydata); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_free_fn *OSSL_FUNC_keymgmt_free(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_free_fn *)opf->function; }
8743
8744
8745
8746
8747 typedef int (OSSL_FUNC_keymgmt_get_params_fn)(void *keydata, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_get_params_fn *OSSL_FUNC_keymgmt_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_get_params_fn *)opf->function; }
8748
8749 typedef const OSSL_PARAM * (OSSL_FUNC_keymgmt_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_gettable_params_fn *OSSL_FUNC_keymgmt_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_gettable_params_fn *)opf->function; }
8750
8751
8752
8753
8754 typedef int (OSSL_FUNC_keymgmt_set_params_fn)(void *keydata, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_set_params_fn *OSSL_FUNC_keymgmt_set_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_set_params_fn *)opf->function; }
8755
8756 typedef const OSSL_PARAM * (OSSL_FUNC_keymgmt_settable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_settable_params_fn *OSSL_FUNC_keymgmt_settable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_settable_params_fn *)opf->function; }
8757
8758
8759
8760
8761 typedef const char * (OSSL_FUNC_keymgmt_query_operation_name_fn)(int operation_id); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_query_operation_name_fn *OSSL_FUNC_keymgmt_query_operation_name(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_query_operation_name_fn *)opf->function; }
8762
8763
8764
8765
8766 typedef int (OSSL_FUNC_keymgmt_has_fn)(const void *keydata, int selection); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_has_fn *OSSL_FUNC_keymgmt_has(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_has_fn *)opf->function; }
8767
8768
8769
8770 typedef int (OSSL_FUNC_keymgmt_validate_fn)(const void *keydata, int selection, int checktype); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_validate_fn *OSSL_FUNC_keymgmt_validate(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_validate_fn *)opf->function; }
8771
8772
8773
8774
8775 typedef int (OSSL_FUNC_keymgmt_match_fn)(const void *keydata1, const void *keydata2, int selection); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_match_fn *OSSL_FUNC_keymgmt_match(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_match_fn *)opf->function; }
8776 # 653 "include/openssl/core_dispatch.h"
8777 typedef int (OSSL_FUNC_keymgmt_import_fn)(void *keydata, int selection, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_import_fn *OSSL_FUNC_keymgmt_import(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_import_fn *)opf->function; }
8778
8779 typedef const OSSL_PARAM * (OSSL_FUNC_keymgmt_import_types_fn)(int selection); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_import_types_fn *OSSL_FUNC_keymgmt_import_types(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_import_types_fn *)opf->function; }
8780
8781 typedef int (OSSL_FUNC_keymgmt_export_fn)(void *keydata, int selection, OSSL_CALLBACK *param_cb, void *cbarg); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_export_fn *OSSL_FUNC_keymgmt_export(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_export_fn *)opf->function; }
8782
8783
8784 typedef const OSSL_PARAM * (OSSL_FUNC_keymgmt_export_types_fn)(int selection); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_export_types_fn *OSSL_FUNC_keymgmt_export_types(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_export_types_fn *)opf->function; }
8785
8786
8787
8788
8789 typedef void * (OSSL_FUNC_keymgmt_dup_fn)(const void *keydata_from, int selection); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_dup_fn *OSSL_FUNC_keymgmt_dup(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_dup_fn *)opf->function; }
8790
8791
8792
8793
8794
8795 typedef const OSSL_PARAM * (OSSL_FUNC_keymgmt_import_types_ex_fn)(void *provctx, int selection); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_import_types_ex_fn *OSSL_FUNC_keymgmt_import_types_ex(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_import_types_ex_fn *)opf->function; }
8796
8797 typedef const OSSL_PARAM * (OSSL_FUNC_keymgmt_export_types_ex_fn)(void *provctx, int selection); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_export_types_ex_fn *OSSL_FUNC_keymgmt_export_types_ex(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_export_types_ex_fn *)opf->function; }
8798 # 689 "include/openssl/core_dispatch.h"
8799 typedef void * (OSSL_FUNC_keyexch_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_keyexch_newctx_fn *OSSL_FUNC_keyexch_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_newctx_fn *)opf->function; }
8800 typedef int (OSSL_FUNC_keyexch_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keyexch_init_fn *OSSL_FUNC_keyexch_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_init_fn *)opf->function; }
8801
8802 typedef int (OSSL_FUNC_keyexch_derive_fn)(void *ctx, unsigned char *secret, size_t *secretlen, size_t outlen); static __attribute__((unused)) inline OSSL_FUNC_keyexch_derive_fn *OSSL_FUNC_keyexch_derive(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_derive_fn *)opf->function; }
8803
8804 typedef int (OSSL_FUNC_keyexch_set_peer_fn)(void *ctx, void *provkey); static __attribute__((unused)) inline OSSL_FUNC_keyexch_set_peer_fn *OSSL_FUNC_keyexch_set_peer(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_set_peer_fn *)opf->function; }
8805 typedef void (OSSL_FUNC_keyexch_freectx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_keyexch_freectx_fn *OSSL_FUNC_keyexch_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_freectx_fn *)opf->function; }
8806 typedef void * (OSSL_FUNC_keyexch_dupctx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_keyexch_dupctx_fn *OSSL_FUNC_keyexch_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_dupctx_fn *)opf->function; }
8807 typedef int (OSSL_FUNC_keyexch_set_ctx_params_fn)(void *ctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keyexch_set_ctx_params_fn *OSSL_FUNC_keyexch_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_set_ctx_params_fn *)opf->function; }
8808
8809 typedef const OSSL_PARAM * (OSSL_FUNC_keyexch_settable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_keyexch_settable_ctx_params_fn *OSSL_FUNC_keyexch_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_settable_ctx_params_fn *)opf->function; }
8810
8811 typedef int (OSSL_FUNC_keyexch_get_ctx_params_fn)(void *ctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keyexch_get_ctx_params_fn *OSSL_FUNC_keyexch_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_get_ctx_params_fn *)opf->function; }
8812
8813 typedef const OSSL_PARAM * (OSSL_FUNC_keyexch_gettable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_keyexch_gettable_ctx_params_fn *OSSL_FUNC_keyexch_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_gettable_ctx_params_fn *)opf->function; }
8814 # 734 "include/openssl/core_dispatch.h"
8815 typedef void * (OSSL_FUNC_signature_newctx_fn)(void *provctx, const char *propq); static __attribute__((unused)) inline OSSL_FUNC_signature_newctx_fn *OSSL_FUNC_signature_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_newctx_fn *)opf->function; }
8816
8817 typedef int (OSSL_FUNC_signature_sign_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_sign_init_fn *OSSL_FUNC_signature_sign_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_sign_init_fn *)opf->function; }
8818
8819 typedef int (OSSL_FUNC_signature_sign_fn)(void *ctx, unsigned char *sig, size_t *siglen, size_t sigsize, const unsigned char *tbs, size_t tbslen); static __attribute__((unused)) inline OSSL_FUNC_signature_sign_fn *OSSL_FUNC_signature_sign(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_sign_fn *)opf->function; }
8820
8821
8822
8823 typedef int (OSSL_FUNC_signature_verify_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_verify_init_fn *OSSL_FUNC_signature_verify_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_verify_init_fn *)opf->function; }
8824
8825 typedef int (OSSL_FUNC_signature_verify_fn)(void *ctx, const unsigned char *sig, size_t siglen, const unsigned char *tbs, size_t tbslen); static __attribute__((unused)) inline OSSL_FUNC_signature_verify_fn *OSSL_FUNC_signature_verify(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_verify_fn *)opf->function; }
8826
8827
8828
8829
8830 typedef int (OSSL_FUNC_signature_verify_recover_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_verify_recover_init_fn *OSSL_FUNC_signature_verify_recover_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_verify_recover_init_fn *)opf->function; }
8831
8832 typedef int (OSSL_FUNC_signature_verify_recover_fn)(void *ctx, unsigned char *rout, size_t *routlen, size_t routsize, const unsigned char *sig, size_t siglen); static __attribute__((unused)) inline OSSL_FUNC_signature_verify_recover_fn *OSSL_FUNC_signature_verify_recover(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_verify_recover_fn *)opf->function; }
8833
8834
8835 typedef int (OSSL_FUNC_signature_digest_sign_init_fn)(void *ctx, const char *mdname, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_sign_init_fn *OSSL_FUNC_signature_digest_sign_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_sign_init_fn *)opf->function; }
8836
8837
8838 typedef int (OSSL_FUNC_signature_digest_sign_update_fn)(void *ctx, const unsigned char *data, size_t datalen); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_sign_update_fn *OSSL_FUNC_signature_digest_sign_update(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_sign_update_fn *)opf->function; }
8839
8840 typedef int (OSSL_FUNC_signature_digest_sign_final_fn)(void *ctx, unsigned char *sig, size_t *siglen, size_t sigsize); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_sign_final_fn *OSSL_FUNC_signature_digest_sign_final(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_sign_final_fn *)opf->function; }
8841
8842
8843 typedef int (OSSL_FUNC_signature_digest_sign_fn)(void *ctx, unsigned char *sigret, size_t *siglen, size_t sigsize, const unsigned char *tbs, size_t tbslen); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_sign_fn *OSSL_FUNC_signature_digest_sign(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_sign_fn *)opf->function; }
8844
8845
8846 typedef int (OSSL_FUNC_signature_digest_verify_init_fn)(void *ctx, const char *mdname, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_verify_init_fn *OSSL_FUNC_signature_digest_verify_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_verify_init_fn *)opf->function; }
8847
8848
8849 typedef int (OSSL_FUNC_signature_digest_verify_update_fn)(void *ctx, const unsigned char *data, size_t datalen); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_verify_update_fn *OSSL_FUNC_signature_digest_verify_update(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_verify_update_fn *)opf->function; }
8850
8851 typedef int (OSSL_FUNC_signature_digest_verify_final_fn)(void *ctx, const unsigned char *sig, size_t siglen); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_verify_final_fn *OSSL_FUNC_signature_digest_verify_final(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_verify_final_fn *)opf->function; }
8852
8853 typedef int (OSSL_FUNC_signature_digest_verify_fn)(void *ctx, const unsigned char *sig, size_t siglen, const unsigned char *tbs, size_t tbslen); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_verify_fn *OSSL_FUNC_signature_digest_verify(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_verify_fn *)opf->function; }
8854
8855
8856 typedef void (OSSL_FUNC_signature_freectx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_signature_freectx_fn *OSSL_FUNC_signature_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_freectx_fn *)opf->function; }
8857 typedef void * (OSSL_FUNC_signature_dupctx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_signature_dupctx_fn *OSSL_FUNC_signature_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_dupctx_fn *)opf->function; }
8858 typedef int (OSSL_FUNC_signature_get_ctx_params_fn)(void *ctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_get_ctx_params_fn *OSSL_FUNC_signature_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_get_ctx_params_fn *)opf->function; }
8859
8860 typedef const OSSL_PARAM * (OSSL_FUNC_signature_gettable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_signature_gettable_ctx_params_fn *OSSL_FUNC_signature_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_gettable_ctx_params_fn *)opf->function; }
8861
8862 typedef int (OSSL_FUNC_signature_set_ctx_params_fn)(void *ctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_set_ctx_params_fn *OSSL_FUNC_signature_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_set_ctx_params_fn *)opf->function; }
8863
8864 typedef const OSSL_PARAM * (OSSL_FUNC_signature_settable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_signature_settable_ctx_params_fn *OSSL_FUNC_signature_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_settable_ctx_params_fn *)opf->function; }
8865
8866 typedef int (OSSL_FUNC_signature_get_ctx_md_params_fn)(void *ctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_get_ctx_md_params_fn *OSSL_FUNC_signature_get_ctx_md_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_get_ctx_md_params_fn *)opf->function; }
8867
8868 typedef const OSSL_PARAM * (OSSL_FUNC_signature_gettable_ctx_md_params_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_signature_gettable_ctx_md_params_fn *OSSL_FUNC_signature_gettable_ctx_md_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_gettable_ctx_md_params_fn *)opf->function; }
8869
8870 typedef int (OSSL_FUNC_signature_set_ctx_md_params_fn)(void *ctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_set_ctx_md_params_fn *OSSL_FUNC_signature_set_ctx_md_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_set_ctx_md_params_fn *)opf->function; }
8871
8872 typedef const OSSL_PARAM * (OSSL_FUNC_signature_settable_ctx_md_params_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_signature_settable_ctx_md_params_fn *OSSL_FUNC_signature_settable_ctx_md_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_settable_ctx_md_params_fn *)opf->function; }
8873 # 809 "include/openssl/core_dispatch.h"
8874 typedef void * (OSSL_FUNC_asym_cipher_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_newctx_fn *OSSL_FUNC_asym_cipher_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_newctx_fn *)opf->function; }
8875 typedef int (OSSL_FUNC_asym_cipher_encrypt_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_encrypt_init_fn *OSSL_FUNC_asym_cipher_encrypt_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_encrypt_init_fn *)opf->function; }
8876
8877 typedef int (OSSL_FUNC_asym_cipher_encrypt_fn)(void *ctx, unsigned char *out, size_t *outlen, size_t outsize, const unsigned char *in, size_t inlen); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_encrypt_fn *OSSL_FUNC_asym_cipher_encrypt(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_encrypt_fn *)opf->function; }
8878
8879
8880
8881
8882 typedef int (OSSL_FUNC_asym_cipher_decrypt_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_decrypt_init_fn *OSSL_FUNC_asym_cipher_decrypt_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_decrypt_init_fn *)opf->function; }
8883
8884 typedef int (OSSL_FUNC_asym_cipher_decrypt_fn)(void *ctx, unsigned char *out, size_t *outlen, size_t outsize, const unsigned char *in, size_t inlen); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_decrypt_fn *OSSL_FUNC_asym_cipher_decrypt(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_decrypt_fn *)opf->function; }
8885
8886
8887
8888
8889 typedef void (OSSL_FUNC_asym_cipher_freectx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_freectx_fn *OSSL_FUNC_asym_cipher_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_freectx_fn *)opf->function; }
8890 typedef void * (OSSL_FUNC_asym_cipher_dupctx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_dupctx_fn *OSSL_FUNC_asym_cipher_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_dupctx_fn *)opf->function; }
8891 typedef int (OSSL_FUNC_asym_cipher_get_ctx_params_fn)(void *ctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_get_ctx_params_fn *OSSL_FUNC_asym_cipher_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_get_ctx_params_fn *)opf->function; }
8892
8893 typedef const OSSL_PARAM * (OSSL_FUNC_asym_cipher_gettable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_gettable_ctx_params_fn *OSSL_FUNC_asym_cipher_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_gettable_ctx_params_fn *)opf->function; }
8894
8895 typedef int (OSSL_FUNC_asym_cipher_set_ctx_params_fn)(void *ctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_set_ctx_params_fn *OSSL_FUNC_asym_cipher_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_set_ctx_params_fn *)opf->function; }
8896
8897 typedef const OSSL_PARAM * (OSSL_FUNC_asym_cipher_settable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_settable_ctx_params_fn *OSSL_FUNC_asym_cipher_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_settable_ctx_params_fn *)opf->function; }
8898 # 850 "include/openssl/core_dispatch.h"
8899 typedef void * (OSSL_FUNC_kem_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_kem_newctx_fn *OSSL_FUNC_kem_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_newctx_fn *)opf->function; }
8900 typedef int (OSSL_FUNC_kem_encapsulate_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kem_encapsulate_init_fn *OSSL_FUNC_kem_encapsulate_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_encapsulate_init_fn *)opf->function; }
8901
8902 typedef int (OSSL_FUNC_kem_auth_encapsulate_init_fn)(void *ctx, void *provkey, void *authprivkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kem_auth_encapsulate_init_fn *OSSL_FUNC_kem_auth_encapsulate_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_auth_encapsulate_init_fn *)opf->function; }
8903
8904
8905 typedef int (OSSL_FUNC_kem_encapsulate_fn)(void *ctx, unsigned char *out, size_t *outlen, unsigned char *secret, size_t *secretlen); static __attribute__((unused)) inline OSSL_FUNC_kem_encapsulate_fn *OSSL_FUNC_kem_encapsulate(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_encapsulate_fn *)opf->function; }
8906
8907
8908
8909 typedef int (OSSL_FUNC_kem_decapsulate_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kem_decapsulate_init_fn *OSSL_FUNC_kem_decapsulate_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_decapsulate_init_fn *)opf->function; }
8910
8911 typedef int (OSSL_FUNC_kem_auth_decapsulate_init_fn)(void *ctx, void *provkey, void *authpubkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kem_auth_decapsulate_init_fn *OSSL_FUNC_kem_auth_decapsulate_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_auth_decapsulate_init_fn *)opf->function; }
8912
8913
8914 typedef int (OSSL_FUNC_kem_decapsulate_fn)(void *ctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t inlen); static __attribute__((unused)) inline OSSL_FUNC_kem_decapsulate_fn *OSSL_FUNC_kem_decapsulate(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_decapsulate_fn *)opf->function; }
8915
8916
8917 typedef void (OSSL_FUNC_kem_freectx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_kem_freectx_fn *OSSL_FUNC_kem_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_freectx_fn *)opf->function; }
8918 typedef void * (OSSL_FUNC_kem_dupctx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_kem_dupctx_fn *OSSL_FUNC_kem_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_dupctx_fn *)opf->function; }
8919 typedef int (OSSL_FUNC_kem_get_ctx_params_fn)(void *ctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kem_get_ctx_params_fn *OSSL_FUNC_kem_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_get_ctx_params_fn *)opf->function; }
8920 typedef const OSSL_PARAM * (OSSL_FUNC_kem_gettable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_kem_gettable_ctx_params_fn *OSSL_FUNC_kem_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_gettable_ctx_params_fn *)opf->function; }
8921
8922 typedef int (OSSL_FUNC_kem_set_ctx_params_fn)(void *ctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kem_set_ctx_params_fn *OSSL_FUNC_kem_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_set_ctx_params_fn *)opf->function; }
8923
8924 typedef const OSSL_PARAM * (OSSL_FUNC_kem_settable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_kem_settable_ctx_params_fn *OSSL_FUNC_kem_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_settable_ctx_params_fn *)opf->function; }
8925 # 889 "include/openssl/core_dispatch.h"
8926 typedef void * (OSSL_FUNC_encoder_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_encoder_newctx_fn *OSSL_FUNC_encoder_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_newctx_fn *)opf->function; }
8927 typedef void (OSSL_FUNC_encoder_freectx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_encoder_freectx_fn *OSSL_FUNC_encoder_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_freectx_fn *)opf->function; }
8928 typedef int (OSSL_FUNC_encoder_get_params_fn)(OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_encoder_get_params_fn *OSSL_FUNC_encoder_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_get_params_fn *)opf->function; }
8929 typedef const OSSL_PARAM * (OSSL_FUNC_encoder_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_encoder_gettable_params_fn *OSSL_FUNC_encoder_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_gettable_params_fn *)opf->function; }
8930
8931 typedef int (OSSL_FUNC_encoder_set_ctx_params_fn)(void *ctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_encoder_set_ctx_params_fn *OSSL_FUNC_encoder_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_set_ctx_params_fn *)opf->function; }
8932
8933 typedef const OSSL_PARAM * (OSSL_FUNC_encoder_settable_ctx_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_encoder_settable_ctx_params_fn *OSSL_FUNC_encoder_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_settable_ctx_params_fn *)opf->function; }
8934
8935
8936 typedef int (OSSL_FUNC_encoder_does_selection_fn)(void *provctx, int selection); static __attribute__((unused)) inline OSSL_FUNC_encoder_does_selection_fn *OSSL_FUNC_encoder_does_selection(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_does_selection_fn *)opf->function; }
8937
8938 typedef int (OSSL_FUNC_encoder_encode_fn)(void *ctx, OSSL_CORE_BIO *out, const void *obj_raw, const OSSL_PARAM obj_abstract[], int selection, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg); static __attribute__((unused)) inline OSSL_FUNC_encoder_encode_fn *OSSL_FUNC_encoder_encode(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_encode_fn *)opf->function; }
8939
8940
8941
8942
8943
8944 typedef void * (OSSL_FUNC_encoder_import_object_fn)(void *ctx, int selection, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_encoder_import_object_fn *OSSL_FUNC_encoder_import_object(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_import_object_fn *)opf->function; }
8945
8946 typedef void (OSSL_FUNC_encoder_free_object_fn)(void *obj); static __attribute__((unused)) inline OSSL_FUNC_encoder_free_object_fn *OSSL_FUNC_encoder_free_object(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_free_object_fn *)opf->function; }
8947 # 920 "include/openssl/core_dispatch.h"
8948 typedef void * (OSSL_FUNC_decoder_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_decoder_newctx_fn *OSSL_FUNC_decoder_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_newctx_fn *)opf->function; }
8949 typedef void (OSSL_FUNC_decoder_freectx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_decoder_freectx_fn *OSSL_FUNC_decoder_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_freectx_fn *)opf->function; }
8950 typedef int (OSSL_FUNC_decoder_get_params_fn)(OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_decoder_get_params_fn *OSSL_FUNC_decoder_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_get_params_fn *)opf->function; }
8951 typedef const OSSL_PARAM * (OSSL_FUNC_decoder_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_decoder_gettable_params_fn *OSSL_FUNC_decoder_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_gettable_params_fn *)opf->function; }
8952
8953 typedef int (OSSL_FUNC_decoder_set_ctx_params_fn)(void *ctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_decoder_set_ctx_params_fn *OSSL_FUNC_decoder_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_set_ctx_params_fn *)opf->function; }
8954
8955 typedef const OSSL_PARAM * (OSSL_FUNC_decoder_settable_ctx_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_decoder_settable_ctx_params_fn *OSSL_FUNC_decoder_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_settable_ctx_params_fn *)opf->function; }
8956
8957
8958 typedef int (OSSL_FUNC_decoder_does_selection_fn)(void *provctx, int selection); static __attribute__((unused)) inline OSSL_FUNC_decoder_does_selection_fn *OSSL_FUNC_decoder_does_selection(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_does_selection_fn *)opf->function; }
8959
8960 typedef int (OSSL_FUNC_decoder_decode_fn)(void *ctx, OSSL_CORE_BIO *in, int selection, OSSL_CALLBACK *data_cb, void *data_cbarg, OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg); static __attribute__((unused)) inline OSSL_FUNC_decoder_decode_fn *OSSL_FUNC_decoder_decode(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_decode_fn *)opf->function; }
8961
8962
8963
8964 typedef int (OSSL_FUNC_decoder_export_object_fn)(void *ctx, const void *objref, size_t objref_sz, OSSL_CALLBACK *export_cb, void *export_cbarg); static __attribute__((unused)) inline OSSL_FUNC_decoder_export_object_fn *OSSL_FUNC_decoder_export_object(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_export_object_fn *)opf->function; }
8965 # 962 "include/openssl/core_dispatch.h"
8966 typedef void * (OSSL_FUNC_store_open_fn)(void *provctx, const char *uri); static __attribute__((unused)) inline OSSL_FUNC_store_open_fn *OSSL_FUNC_store_open(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_open_fn *)opf->function; }
8967 typedef void * (OSSL_FUNC_store_attach_fn)(void *provctx, OSSL_CORE_BIO *in); static __attribute__((unused)) inline OSSL_FUNC_store_attach_fn *OSSL_FUNC_store_attach(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_attach_fn *)opf->function; }
8968 typedef const OSSL_PARAM * (OSSL_FUNC_store_settable_ctx_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_store_settable_ctx_params_fn *OSSL_FUNC_store_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_settable_ctx_params_fn *)opf->function; }
8969
8970 typedef int (OSSL_FUNC_store_set_ctx_params_fn)(void *loaderctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_store_set_ctx_params_fn *OSSL_FUNC_store_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_set_ctx_params_fn *)opf->function; }
8971
8972 typedef int (OSSL_FUNC_store_load_fn)(void *loaderctx, OSSL_CALLBACK *object_cb, void *object_cbarg, OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg); static __attribute__((unused)) inline OSSL_FUNC_store_load_fn *OSSL_FUNC_store_load(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_load_fn *)opf->function; }
8973
8974
8975
8976 typedef int (OSSL_FUNC_store_eof_fn)(void *loaderctx); static __attribute__((unused)) inline OSSL_FUNC_store_eof_fn *OSSL_FUNC_store_eof(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_eof_fn *)opf->function; }
8977 typedef int (OSSL_FUNC_store_close_fn)(void *loaderctx); static __attribute__((unused)) inline OSSL_FUNC_store_close_fn *OSSL_FUNC_store_close(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_close_fn *)opf->function; }
8978 typedef int (OSSL_FUNC_store_export_object_fn)(void *loaderctx, const void *objref, size_t objref_sz, OSSL_CALLBACK *export_cb, void *export_cbarg); static __attribute__((unused)) inline OSSL_FUNC_store_export_object_fn *OSSL_FUNC_store_export_object(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_export_object_fn *)opf->function; }
8979
8980
8981 typedef int (OSSL_FUNC_store_delete_fn)(void *provctx, const char *uri, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg); static __attribute__((unused)) inline OSSL_FUNC_store_delete_fn *OSSL_FUNC_store_delete(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_delete_fn *)opf->function; }
8982
8983
8984 typedef void * (OSSL_FUNC_store_open_ex_fn)(void *provctx, const char *uri, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg); static __attribute__((unused)) inline OSSL_FUNC_store_open_ex_fn *OSSL_FUNC_store_open_ex(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_open_ex_fn *)opf->function; }
8985 # 29 "include/openssl/evp.h" 2
8986
8987
8988 # 1 "include/openssl/evperr.h" 1
8989 # 13 "include/openssl/evperr.h"
8990
8991 # 32 "include/openssl/evp.h" 2
8992 # 1 "include/openssl/params.h" 1
8993 # 13 "include/openssl/params.h"
8994
8995 # 71 "include/openssl/params.h"
8996 OSSL_PARAM *OSSL_PARAM_locate(OSSL_PARAM *p, const char *key);
8997 const OSSL_PARAM *OSSL_PARAM_locate_const(const OSSL_PARAM *p, const char *key);
8998
8999
9000 OSSL_PARAM OSSL_PARAM_construct_int(const char *key, int *buf);
9001 OSSL_PARAM OSSL_PARAM_construct_uint(const char *key, unsigned int *buf);
9002 OSSL_PARAM OSSL_PARAM_construct_long(const char *key, long int *buf);
9003 OSSL_PARAM OSSL_PARAM_construct_ulong(const char *key, unsigned long int *buf);
9004 OSSL_PARAM OSSL_PARAM_construct_int32(const char *key, int32_t *buf);
9005 OSSL_PARAM OSSL_PARAM_construct_uint32(const char *key, uint32_t *buf);
9006 OSSL_PARAM OSSL_PARAM_construct_int64(const char *key, int64_t *buf);
9007 OSSL_PARAM OSSL_PARAM_construct_uint64(const char *key, uint64_t *buf);
9008 OSSL_PARAM OSSL_PARAM_construct_size_t(const char *key, size_t *buf);
9009 OSSL_PARAM OSSL_PARAM_construct_time_t(const char *key, time_t *buf);
9010 OSSL_PARAM OSSL_PARAM_construct_BN(const char *key, unsigned char *buf,
9011 size_t bsize);
9012 OSSL_PARAM OSSL_PARAM_construct_double(const char *key, double *buf);
9013 OSSL_PARAM OSSL_PARAM_construct_utf8_string(const char *key, char *buf,
9014 size_t bsize);
9015 OSSL_PARAM OSSL_PARAM_construct_utf8_ptr(const char *key, char **buf,
9016 size_t bsize);
9017 OSSL_PARAM OSSL_PARAM_construct_octet_string(const char *key, void *buf,
9018 size_t bsize);
9019 OSSL_PARAM OSSL_PARAM_construct_octet_ptr(const char *key, void **buf,
9020 size_t bsize);
9021 OSSL_PARAM OSSL_PARAM_construct_end(void);
9022
9023 int OSSL_PARAM_allocate_from_text(OSSL_PARAM *to,
9024 const OSSL_PARAM *paramdefs,
9025 const char *key, const char *value,
9026 size_t value_n, int *found);
9027
9028 int OSSL_PARAM_get_int(const OSSL_PARAM *p, int *val);
9029 int OSSL_PARAM_get_uint(const OSSL_PARAM *p, unsigned int *val);
9030 int OSSL_PARAM_get_long(const OSSL_PARAM *p, long int *val);
9031 int OSSL_PARAM_get_ulong(const OSSL_PARAM *p, unsigned long int *val);
9032 int OSSL_PARAM_get_int32(const OSSL_PARAM *p, int32_t *val);
9033 int OSSL_PARAM_get_uint32(const OSSL_PARAM *p, uint32_t *val);
9034 int OSSL_PARAM_get_int64(const OSSL_PARAM *p, int64_t *val);
9035 int OSSL_PARAM_get_uint64(const OSSL_PARAM *p, uint64_t *val);
9036 int OSSL_PARAM_get_size_t(const OSSL_PARAM *p, size_t *val);
9037 int OSSL_PARAM_get_time_t(const OSSL_PARAM *p, time_t *val);
9038
9039 int OSSL_PARAM_set_int(OSSL_PARAM *p, int val);
9040 int OSSL_PARAM_set_uint(OSSL_PARAM *p, unsigned int val);
9041 int OSSL_PARAM_set_long(OSSL_PARAM *p, long int val);
9042 int OSSL_PARAM_set_ulong(OSSL_PARAM *p, unsigned long int val);
9043 int OSSL_PARAM_set_int32(OSSL_PARAM *p, int32_t val);
9044 int OSSL_PARAM_set_uint32(OSSL_PARAM *p, uint32_t val);
9045 int OSSL_PARAM_set_int64(OSSL_PARAM *p, int64_t val);
9046 int OSSL_PARAM_set_uint64(OSSL_PARAM *p, uint64_t val);
9047 int OSSL_PARAM_set_size_t(OSSL_PARAM *p, size_t val);
9048 int OSSL_PARAM_set_time_t(OSSL_PARAM *p, time_t val);
9049
9050 int OSSL_PARAM_get_double(const OSSL_PARAM *p, double *val);
9051 int OSSL_PARAM_set_double(OSSL_PARAM *p, double val);
9052
9053 int OSSL_PARAM_get_BN(const OSSL_PARAM *p, BIGNUM **val);
9054 int OSSL_PARAM_set_BN(OSSL_PARAM *p, const BIGNUM *val);
9055
9056 int OSSL_PARAM_get_utf8_string(const OSSL_PARAM *p, char **val, size_t max_len);
9057 int OSSL_PARAM_set_utf8_string(OSSL_PARAM *p, const char *val);
9058
9059 int OSSL_PARAM_get_octet_string(const OSSL_PARAM *p, void **val, size_t max_len,
9060 size_t *used_len);
9061 int OSSL_PARAM_set_octet_string(OSSL_PARAM *p, const void *val, size_t len);
9062
9063 int OSSL_PARAM_get_utf8_ptr(const OSSL_PARAM *p, const char **val);
9064 int OSSL_PARAM_set_utf8_ptr(OSSL_PARAM *p, const char *val);
9065
9066 int OSSL_PARAM_get_octet_ptr(const OSSL_PARAM *p, const void **val,
9067 size_t *used_len);
9068 int OSSL_PARAM_set_octet_ptr(OSSL_PARAM *p, const void *val,
9069 size_t used_len);
9070
9071 int OSSL_PARAM_get_utf8_string_ptr(const OSSL_PARAM *p, const char **val);
9072 int OSSL_PARAM_get_octet_string_ptr(const OSSL_PARAM *p, const void **val,
9073 size_t *used_len);
9074
9075 int OSSL_PARAM_modified(const OSSL_PARAM *p);
9076 void OSSL_PARAM_set_all_unmodified(OSSL_PARAM *p);
9077
9078 OSSL_PARAM *OSSL_PARAM_dup(const OSSL_PARAM *p);
9079 OSSL_PARAM *OSSL_PARAM_merge(const OSSL_PARAM *p1, const OSSL_PARAM *p2);
9080 void OSSL_PARAM_free(OSSL_PARAM *p);
9081 # 33 "include/openssl/evp.h" 2
9082 # 44 "include/openssl/evp.h"
9083 # 1 "include/openssl/objects.h" 1
9084 # 12 "include/openssl/objects.h"
9085
9086
9087
9088
9089
9090
9091
9092 # 1 "include/openssl/obj_mac.h" 1
9093 # 14 "include/openssl/obj_mac.h"
9094
9095 # 20 "include/openssl/objects.h" 2
9096
9097
9098 # 1 "include/openssl/objectserr.h" 1
9099 # 13 "include/openssl/objectserr.h"
9100
9101 # 23 "include/openssl/objects.h" 2
9102 # 43 "include/openssl/objects.h"
9103 typedef struct obj_name_st {
9104 int type;
9105 int alias;
9106 const char *name;
9107 const char *data;
9108 } OBJ_NAME;
9109
9110
9111
9112 int OBJ_NAME_init(void);
9113 int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
9114 int (*cmp_func) (const char *, const char *),
9115 void (*free_func) (const char *, int, const char *));
9116 const char *OBJ_NAME_get(const char *name, int type);
9117 int OBJ_NAME_add(const char *name, int type, const char *data);
9118 int OBJ_NAME_remove(const char *name, int type);
9119 void OBJ_NAME_cleanup(int type);
9120 void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg),
9121 void *arg);
9122 void OBJ_NAME_do_all_sorted(int type,
9123 void (*fn) (const OBJ_NAME *, void *arg),
9124 void *arg);
9125
9126 extern ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *a);
9127 ASN1_OBJECT *OBJ_nid2obj(int n);
9128 const char *OBJ_nid2ln(int n);
9129 const char *OBJ_nid2sn(int n);
9130 int OBJ_obj2nid(const ASN1_OBJECT *o);
9131 ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name);
9132 int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
9133 int OBJ_txt2nid(const char *s);
9134 int OBJ_ln2nid(const char *s);
9135 int OBJ_sn2nid(const char *s);
9136 int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);
9137 const void *OBJ_bsearch_(const void *key, const void *base, int num, int size,
9138 int (*cmp) (const void *, const void *));
9139 const void *OBJ_bsearch_ex_(const void *key, const void *base, int num,
9140 int size,
9141 int (*cmp) (const void *, const void *),
9142 int flags);
9143 # 163 "include/openssl/objects.h"
9144 int OBJ_new_nid(int num);
9145 int OBJ_add_object(const ASN1_OBJECT *obj);
9146 int OBJ_create(const char *oid, const char *sn, const char *ln);
9147
9148
9149
9150 int OBJ_create_objects(BIO *in);
9151
9152 size_t OBJ_length(const ASN1_OBJECT *obj);
9153 const unsigned char *OBJ_get0_data(const ASN1_OBJECT *obj);
9154
9155 int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid);
9156 int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);
9157 int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
9158 void OBJ_sigid_free(void);
9159 # 45 "include/openssl/evp.h" 2
9160 # 100 "include/openssl/evp.h"
9161 int EVP_set_default_properties(OSSL_LIB_CTX *libctx, const char *propq);
9162 int EVP_default_properties_is_fips_enabled(OSSL_LIB_CTX *libctx);
9163 int EVP_default_properties_enable_fips(OSSL_LIB_CTX *libctx, int enable);
9164 # 111 "include/openssl/evp.h"
9165 __attribute__((deprecated("Since OpenSSL " "3.0"))) EVP_MD *EVP_MD_meth_new(int md_type, int pkey_type);
9166 __attribute__((deprecated("Since OpenSSL " "3.0"))) EVP_MD *EVP_MD_meth_dup(const EVP_MD *md);
9167 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_MD_meth_free(EVP_MD *md);
9168 __attribute__((deprecated("Since OpenSSL " "3.0")))
9169 int EVP_MD_meth_set_input_blocksize(EVP_MD *md, int blocksize);
9170 __attribute__((deprecated("Since OpenSSL " "3.0")))
9171 int EVP_MD_meth_set_result_size(EVP_MD *md, int resultsize);
9172 __attribute__((deprecated("Since OpenSSL " "3.0")))
9173 int EVP_MD_meth_set_app_datasize(EVP_MD *md, int datasize);
9174 __attribute__((deprecated("Since OpenSSL " "3.0")))
9175 int EVP_MD_meth_set_flags(EVP_MD *md, unsigned long flags);
9176 __attribute__((deprecated("Since OpenSSL " "3.0")))
9177 int EVP_MD_meth_set_init(EVP_MD *md, int (*init)(EVP_MD_CTX *ctx));
9178 __attribute__((deprecated("Since OpenSSL " "3.0")))
9179 int EVP_MD_meth_set_update(EVP_MD *md, int (*update)(EVP_MD_CTX *ctx,
9180 const void *data,
9181 size_t count));
9182 __attribute__((deprecated("Since OpenSSL " "3.0")))
9183 int EVP_MD_meth_set_final(EVP_MD *md, int (*final)(EVP_MD_CTX *ctx,
9184 unsigned char *md));
9185 __attribute__((deprecated("Since OpenSSL " "3.0")))
9186 int EVP_MD_meth_set_copy(EVP_MD *md, int (*copy)(EVP_MD_CTX *to,
9187 const EVP_MD_CTX *from));
9188 __attribute__((deprecated("Since OpenSSL " "3.0")))
9189 int EVP_MD_meth_set_cleanup(EVP_MD *md, int (*cleanup)(EVP_MD_CTX *ctx));
9190 __attribute__((deprecated("Since OpenSSL " "3.0")))
9191 int EVP_MD_meth_set_ctrl(EVP_MD *md, int (*ctrl)(EVP_MD_CTX *ctx, int cmd,
9192 int p1, void *p2));
9193 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_MD_meth_get_input_blocksize(const EVP_MD *md);
9194 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_MD_meth_get_result_size(const EVP_MD *md);
9195 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_MD_meth_get_app_datasize(const EVP_MD *md);
9196 __attribute__((deprecated("Since OpenSSL " "3.0"))) unsigned long EVP_MD_meth_get_flags(const EVP_MD *md);
9197 __attribute__((deprecated("Since OpenSSL " "3.0")))
9198 int (*EVP_MD_meth_get_init(const EVP_MD *md))(EVP_MD_CTX *ctx);
9199 __attribute__((deprecated("Since OpenSSL " "3.0")))
9200 int (*EVP_MD_meth_get_update(const EVP_MD *md))(EVP_MD_CTX *ctx,
9201 const void *data, size_t count);
9202 __attribute__((deprecated("Since OpenSSL " "3.0")))
9203 int (*EVP_MD_meth_get_final(const EVP_MD *md))(EVP_MD_CTX *ctx,
9204 unsigned char *md);
9205 __attribute__((deprecated("Since OpenSSL " "3.0")))
9206 int (*EVP_MD_meth_get_copy(const EVP_MD *md))(EVP_MD_CTX *to,
9207 const EVP_MD_CTX *from);
9208 __attribute__((deprecated("Since OpenSSL " "3.0")))
9209 int (*EVP_MD_meth_get_cleanup(const EVP_MD *md))(EVP_MD_CTX *ctx);
9210 __attribute__((deprecated("Since OpenSSL " "3.0")))
9211 int (*EVP_MD_meth_get_ctrl(const EVP_MD *md))(EVP_MD_CTX *ctx, int cmd,
9212 int p1, void *p2);
9213 # 235 "include/openssl/evp.h"
9214 __attribute__((deprecated("Since OpenSSL " "3.0")))
9215 EVP_CIPHER *EVP_CIPHER_meth_new(int cipher_type, int block_size, int key_len);
9216 __attribute__((deprecated("Since OpenSSL " "3.0")))
9217 EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher);
9218 __attribute__((deprecated("Since OpenSSL " "3.0")))
9219 void EVP_CIPHER_meth_free(EVP_CIPHER *cipher);
9220 __attribute__((deprecated("Since OpenSSL " "3.0")))
9221 int EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len);
9222 __attribute__((deprecated("Since OpenSSL " "3.0")))
9223 int EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags);
9224 __attribute__((deprecated("Since OpenSSL " "3.0")))
9225 int EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size);
9226 __attribute__((deprecated("Since OpenSSL " "3.0")))
9227 int EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher,
9228 int (*init) (EVP_CIPHER_CTX *ctx,
9229 const unsigned char *key,
9230 const unsigned char *iv,
9231 int enc));
9232 __attribute__((deprecated("Since OpenSSL " "3.0")))
9233 int EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher,
9234 int (*do_cipher) (EVP_CIPHER_CTX *ctx,
9235 unsigned char *out,
9236 const unsigned char *in,
9237 size_t inl));
9238 __attribute__((deprecated("Since OpenSSL " "3.0")))
9239 int EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher,
9240 int (*cleanup) (EVP_CIPHER_CTX *));
9241 __attribute__((deprecated("Since OpenSSL " "3.0")))
9242 int EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher,
9243 int (*set_asn1_parameters) (EVP_CIPHER_CTX *,
9244 ASN1_TYPE *));
9245 __attribute__((deprecated("Since OpenSSL " "3.0")))
9246 int EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher,
9247 int (*get_asn1_parameters) (EVP_CIPHER_CTX *,
9248 ASN1_TYPE *));
9249 __attribute__((deprecated("Since OpenSSL " "3.0")))
9250 int EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher,
9251 int (*ctrl) (EVP_CIPHER_CTX *, int type,
9252 int arg, void *ptr));
9253 __attribute__((deprecated("Since OpenSSL " "3.0"))) int
9254 (*EVP_CIPHER_meth_get_init(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx,
9255 const unsigned char *key,
9256 const unsigned char *iv,
9257 int enc);
9258 __attribute__((deprecated("Since OpenSSL " "3.0"))) int
9259 (*EVP_CIPHER_meth_get_do_cipher(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx,
9260 unsigned char *out,
9261 const unsigned char *in,
9262 size_t inl);
9263 __attribute__((deprecated("Since OpenSSL " "3.0"))) int
9264 (*EVP_CIPHER_meth_get_cleanup(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *);
9265 __attribute__((deprecated("Since OpenSSL " "3.0"))) int
9266 (*EVP_CIPHER_meth_get_set_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *,
9267 ASN1_TYPE *);
9268 __attribute__((deprecated("Since OpenSSL " "3.0"))) int
9269 (*EVP_CIPHER_meth_get_get_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *,
9270 ASN1_TYPE *);
9271 __attribute__((deprecated("Since OpenSSL " "3.0"))) int
9272 (*EVP_CIPHER_meth_get_ctrl(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *, int type,
9273 int arg, void *ptr);
9274 # 453 "include/openssl/evp.h"
9275 typedef struct {
9276 unsigned char *out;
9277 const unsigned char *inp;
9278 size_t len;
9279 unsigned int interleave;
9280 } EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM;
9281 # 483 "include/openssl/evp.h"
9282 typedef struct evp_cipher_info_st {
9283 const EVP_CIPHER *cipher;
9284 unsigned char iv[16];
9285 } EVP_CIPHER_INFO;
9286
9287
9288
9289 typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass,
9290 int passlen, ASN1_TYPE *param,
9291 const EVP_CIPHER *cipher, const EVP_MD *md,
9292 int en_de);
9293
9294 typedef int (EVP_PBE_KEYGEN_EX) (EVP_CIPHER_CTX *ctx, const char *pass,
9295 int passlen, ASN1_TYPE *param,
9296 const EVP_CIPHER *cipher, const EVP_MD *md,
9297 int en_de, OSSL_LIB_CTX *libctx, const char *propq);
9298 # 536 "include/openssl/evp.h"
9299 int EVP_MD_get_type(const EVP_MD *md);
9300
9301
9302 const char *EVP_MD_get0_name(const EVP_MD *md);
9303
9304 const char *EVP_MD_get0_description(const EVP_MD *md);
9305 int EVP_MD_is_a(const EVP_MD *md, const char *name);
9306 int EVP_MD_names_do_all(const EVP_MD *md,
9307 void (*fn)(const char *name, void *data),
9308 void *data);
9309 const OSSL_PROVIDER *EVP_MD_get0_provider(const EVP_MD *md);
9310 int EVP_MD_get_pkey_type(const EVP_MD *md);
9311
9312 int EVP_MD_get_size(const EVP_MD *md);
9313
9314 int EVP_MD_get_block_size(const EVP_MD *md);
9315
9316 unsigned long EVP_MD_get_flags(const EVP_MD *md);
9317
9318
9319 const EVP_MD *EVP_MD_CTX_get0_md(const EVP_MD_CTX *ctx);
9320 EVP_MD *EVP_MD_CTX_get1_md(EVP_MD_CTX *ctx);
9321
9322 __attribute__((deprecated("Since OpenSSL " "3.0")))
9323 const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
9324 __attribute__((deprecated("Since OpenSSL " "3.0")))
9325 int (*EVP_MD_CTX_update_fn(EVP_MD_CTX *ctx))(EVP_MD_CTX *ctx,
9326 const void *data, size_t count);
9327 __attribute__((deprecated("Since OpenSSL " "3.0")))
9328 void EVP_MD_CTX_set_update_fn(EVP_MD_CTX *ctx,
9329 int (*update) (EVP_MD_CTX *ctx,
9330 const void *data, size_t count));
9331 # 576 "include/openssl/evp.h"
9332 EVP_PKEY_CTX *EVP_MD_CTX_get_pkey_ctx(const EVP_MD_CTX *ctx);
9333
9334 void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx);
9335 void *EVP_MD_CTX_get0_md_data(const EVP_MD_CTX *ctx);
9336
9337
9338 int EVP_CIPHER_get_nid(const EVP_CIPHER *cipher);
9339
9340 const char *EVP_CIPHER_get0_name(const EVP_CIPHER *cipher);
9341
9342 const char *EVP_CIPHER_get0_description(const EVP_CIPHER *cipher);
9343 int EVP_CIPHER_is_a(const EVP_CIPHER *cipher, const char *name);
9344 int EVP_CIPHER_names_do_all(const EVP_CIPHER *cipher,
9345 void (*fn)(const char *name, void *data),
9346 void *data);
9347 const OSSL_PROVIDER *EVP_CIPHER_get0_provider(const EVP_CIPHER *cipher);
9348 int EVP_CIPHER_get_block_size(const EVP_CIPHER *cipher);
9349
9350
9351 __attribute__((deprecated("Since OpenSSL " "3.0")))
9352 int EVP_CIPHER_impl_ctx_size(const EVP_CIPHER *cipher);
9353
9354 int EVP_CIPHER_get_key_length(const EVP_CIPHER *cipher);
9355
9356 int EVP_CIPHER_get_iv_length(const EVP_CIPHER *cipher);
9357
9358 unsigned long EVP_CIPHER_get_flags(const EVP_CIPHER *cipher);
9359
9360 int EVP_CIPHER_get_mode(const EVP_CIPHER *cipher);
9361
9362 int EVP_CIPHER_get_type(const EVP_CIPHER *cipher);
9363
9364 EVP_CIPHER *EVP_CIPHER_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
9365 const char *properties);
9366 int EVP_CIPHER_up_ref(EVP_CIPHER *cipher);
9367 void EVP_CIPHER_free(EVP_CIPHER *cipher);
9368
9369 const EVP_CIPHER *EVP_CIPHER_CTX_get0_cipher(const EVP_CIPHER_CTX *ctx);
9370 EVP_CIPHER *EVP_CIPHER_CTX_get1_cipher(EVP_CIPHER_CTX *ctx);
9371 int EVP_CIPHER_CTX_is_encrypting(const EVP_CIPHER_CTX *ctx);
9372
9373 int EVP_CIPHER_CTX_get_nid(const EVP_CIPHER_CTX *ctx);
9374
9375 int EVP_CIPHER_CTX_get_block_size(const EVP_CIPHER_CTX *ctx);
9376
9377 int EVP_CIPHER_CTX_get_key_length(const EVP_CIPHER_CTX *ctx);
9378
9379 int EVP_CIPHER_CTX_get_iv_length(const EVP_CIPHER_CTX *ctx);
9380
9381 int EVP_CIPHER_CTX_get_tag_length(const EVP_CIPHER_CTX *ctx);
9382
9383
9384 const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx);
9385 __attribute__((deprecated("Since OpenSSL " "3.0"))) const unsigned char *EVP_CIPHER_CTX_iv(const EVP_CIPHER_CTX *ctx);
9386 __attribute__((deprecated("Since OpenSSL " "3.0"))) const unsigned char *EVP_CIPHER_CTX_original_iv(const EVP_CIPHER_CTX *ctx);
9387 __attribute__((deprecated("Since OpenSSL " "3.0"))) unsigned char *EVP_CIPHER_CTX_iv_noconst(EVP_CIPHER_CTX *ctx);
9388
9389 int EVP_CIPHER_CTX_get_updated_iv(EVP_CIPHER_CTX *ctx, void *buf, size_t len);
9390 int EVP_CIPHER_CTX_get_original_iv(EVP_CIPHER_CTX *ctx, void *buf, size_t len);
9391
9392 __attribute__((deprecated("Since OpenSSL " "3.0")))
9393 unsigned char *EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx);
9394
9395 int EVP_CIPHER_CTX_get_num(const EVP_CIPHER_CTX *ctx);
9396
9397 int EVP_CIPHER_CTX_set_num(EVP_CIPHER_CTX *ctx, int num);
9398 EVP_CIPHER_CTX *EVP_CIPHER_CTX_dup(const EVP_CIPHER_CTX *in);
9399 int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
9400 void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);
9401 void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data);
9402 void *EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx);
9403 void *EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data);
9404 # 680 "include/openssl/evp.h"
9405 int EVP_Cipher(EVP_CIPHER_CTX *c,
9406 unsigned char *out,
9407 const unsigned char *in, unsigned int inl);
9408 # 693 "include/openssl/evp.h"
9409 int EVP_MD_get_params(const EVP_MD *digest, OSSL_PARAM params[]);
9410 int EVP_MD_CTX_set_params(EVP_MD_CTX *ctx, const OSSL_PARAM params[]);
9411 int EVP_MD_CTX_get_params(EVP_MD_CTX *ctx, OSSL_PARAM params[]);
9412 const OSSL_PARAM *EVP_MD_gettable_params(const EVP_MD *digest);
9413 const OSSL_PARAM *EVP_MD_settable_ctx_params(const EVP_MD *md);
9414 const OSSL_PARAM *EVP_MD_gettable_ctx_params(const EVP_MD *md);
9415 const OSSL_PARAM *EVP_MD_CTX_settable_params(EVP_MD_CTX *ctx);
9416 const OSSL_PARAM *EVP_MD_CTX_gettable_params(EVP_MD_CTX *ctx);
9417 int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
9418 EVP_MD_CTX *EVP_MD_CTX_new(void);
9419 int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
9420 void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
9421
9422
9423
9424 EVP_MD_CTX *EVP_MD_CTX_dup(const EVP_MD_CTX *in);
9425 int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
9426 void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
9427 void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
9428 int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
9429 int EVP_DigestInit_ex2(EVP_MD_CTX *ctx, const EVP_MD *type,
9430 const OSSL_PARAM params[]);
9431 int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type,
9432 ENGINE *impl);
9433 int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d,
9434 size_t cnt);
9435 int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md,
9436 unsigned int *s);
9437 int EVP_Digest(const void *data, size_t count,
9438 unsigned char *md, unsigned int *size,
9439 const EVP_MD *type, ENGINE *impl);
9440 int EVP_Q_digest(OSSL_LIB_CTX *libctx, const char *name,
9441 const char *propq, const void *data, size_t datalen,
9442 unsigned char *md, size_t *mdlen);
9443
9444 int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in);
9445 int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
9446 int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md,
9447 unsigned int *s);
9448 int EVP_DigestFinalXOF(EVP_MD_CTX *ctx, unsigned char *out,
9449 size_t outlen);
9450 int EVP_DigestSqueeze(EVP_MD_CTX *ctx, unsigned char *out,
9451 size_t outlen);
9452
9453 EVP_MD *EVP_MD_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
9454 const char *properties);
9455
9456 int EVP_MD_up_ref(EVP_MD *md);
9457 void EVP_MD_free(EVP_MD *md);
9458
9459 int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);
9460 int EVP_read_pw_string_min(char *buf, int minlen, int maxlen,
9461 const char *prompt, int verify);
9462 void EVP_set_pw_prompt(const char *prompt);
9463 char *EVP_get_pw_prompt(void);
9464
9465 int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
9466 const unsigned char *salt,
9467 const unsigned char *data, int datal, int count,
9468 unsigned char *key, unsigned char *iv);
9469
9470 void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
9471 void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
9472 int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags);
9473
9474 int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
9475 const unsigned char *key, const unsigned char *iv);
9476 int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx,
9477 const EVP_CIPHER *cipher, ENGINE *impl,
9478 const unsigned char *key,
9479 const unsigned char *iv);
9480 int EVP_EncryptInit_ex2(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
9481 const unsigned char *key,
9482 const unsigned char *iv,
9483 const OSSL_PARAM params[]);
9484 int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
9485 int *outl, const unsigned char *in, int inl);
9486 int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out,
9487 int *outl);
9488 int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out,
9489 int *outl);
9490
9491 int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
9492 const unsigned char *key, const unsigned char *iv);
9493 int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx,
9494 const EVP_CIPHER *cipher, ENGINE *impl,
9495 const unsigned char *key,
9496 const unsigned char *iv);
9497 int EVP_DecryptInit_ex2(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
9498 const unsigned char *key,
9499 const unsigned char *iv,
9500 const OSSL_PARAM params[]);
9501 int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
9502 int *outl, const unsigned char *in, int inl);
9503 int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm,
9504 int *outl);
9505 int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm,
9506 int *outl);
9507
9508 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
9509 const unsigned char *key, const unsigned char *iv,
9510 int enc);
9511 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx,
9512 const EVP_CIPHER *cipher, ENGINE *impl,
9513 const unsigned char *key,
9514 const unsigned char *iv, int enc);
9515 int EVP_CipherInit_ex2(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
9516 const unsigned char *key, const unsigned char *iv,
9517 int enc, const OSSL_PARAM params[]);
9518 int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
9519 int *outl, const unsigned char *in, int inl);
9520 int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm,
9521 int *outl);
9522 int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm,
9523 int *outl);
9524
9525 int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
9526 EVP_PKEY *pkey);
9527 int EVP_SignFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
9528 EVP_PKEY *pkey, OSSL_LIB_CTX *libctx,
9529 const char *propq);
9530
9531 int EVP_DigestSign(EVP_MD_CTX *ctx, unsigned char *sigret,
9532 size_t *siglen, const unsigned char *tbs,
9533 size_t tbslen);
9534
9535 int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
9536 unsigned int siglen, EVP_PKEY *pkey);
9537 int EVP_VerifyFinal_ex(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
9538 unsigned int siglen, EVP_PKEY *pkey,
9539 OSSL_LIB_CTX *libctx, const char *propq);
9540
9541 int EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret,
9542 size_t siglen, const unsigned char *tbs,
9543 size_t tbslen);
9544
9545 int EVP_DigestSignInit_ex(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
9546 const char *mdname, OSSL_LIB_CTX *libctx,
9547 const char *props, EVP_PKEY *pkey,
9548 const OSSL_PARAM params[]);
9549 int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
9550 const EVP_MD *type, ENGINE *e,
9551 EVP_PKEY *pkey);
9552 int EVP_DigestSignUpdate(EVP_MD_CTX *ctx, const void *data, size_t dsize);
9553 int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
9554 size_t *siglen);
9555
9556 int EVP_DigestVerifyInit_ex(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
9557 const char *mdname, OSSL_LIB_CTX *libctx,
9558 const char *props, EVP_PKEY *pkey,
9559 const OSSL_PARAM params[]);
9560 int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
9561 const EVP_MD *type, ENGINE *e,
9562 EVP_PKEY *pkey);
9563 int EVP_DigestVerifyUpdate(EVP_MD_CTX *ctx, const void *data, size_t dsize);
9564 int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig,
9565 size_t siglen);
9566
9567 int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
9568 const unsigned char *ek, int ekl,
9569 const unsigned char *iv, EVP_PKEY *priv);
9570 int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
9571
9572 int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
9573 unsigned char **ek, int *ekl, unsigned char *iv,
9574 EVP_PKEY **pubk, int npubk);
9575 int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
9576
9577 EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void);
9578 void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx);
9579 int EVP_ENCODE_CTX_copy(EVP_ENCODE_CTX *dctx, const EVP_ENCODE_CTX *sctx);
9580 int EVP_ENCODE_CTX_num(EVP_ENCODE_CTX *ctx);
9581 void EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
9582 int EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
9583 const unsigned char *in, int inl);
9584 void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
9585 int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
9586
9587 void EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
9588 int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
9589 const unsigned char *in, int inl);
9590 int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
9591 char *out, int *outl);
9592 int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
9593
9594
9595
9596
9597
9598 EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
9599 int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
9600 void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *c);
9601 int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
9602 int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
9603 int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
9604 int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
9605 int EVP_CIPHER_get_params(EVP_CIPHER *cipher, OSSL_PARAM params[]);
9606 int EVP_CIPHER_CTX_set_params(EVP_CIPHER_CTX *ctx, const OSSL_PARAM params[]);
9607 int EVP_CIPHER_CTX_get_params(EVP_CIPHER_CTX *ctx, OSSL_PARAM params[]);
9608 const OSSL_PARAM *EVP_CIPHER_gettable_params(const EVP_CIPHER *cipher);
9609 const OSSL_PARAM *EVP_CIPHER_settable_ctx_params(const EVP_CIPHER *cipher);
9610 const OSSL_PARAM *EVP_CIPHER_gettable_ctx_params(const EVP_CIPHER *cipher);
9611 const OSSL_PARAM *EVP_CIPHER_CTX_settable_params(EVP_CIPHER_CTX *ctx);
9612 const OSSL_PARAM *EVP_CIPHER_CTX_gettable_params(EVP_CIPHER_CTX *ctx);
9613
9614 const BIO_METHOD *BIO_f_md(void);
9615 const BIO_METHOD *BIO_f_base64(void);
9616 const BIO_METHOD *BIO_f_cipher(void);
9617 const BIO_METHOD *BIO_f_reliable(void);
9618 int BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
9619 const unsigned char *i, int enc);
9620
9621 const EVP_MD *EVP_md_null(void);
9622
9623
9624
9625
9626 const EVP_MD *EVP_md4(void);
9627
9628
9629 const EVP_MD *EVP_md5(void);
9630 const EVP_MD *EVP_md5_sha1(void);
9631
9632
9633 const EVP_MD *EVP_blake2b512(void);
9634 const EVP_MD *EVP_blake2s256(void);
9635
9636 const EVP_MD *EVP_sha1(void);
9637 const EVP_MD *EVP_sha224(void);
9638 const EVP_MD *EVP_sha256(void);
9639 const EVP_MD *EVP_sha384(void);
9640 const EVP_MD *EVP_sha512(void);
9641 const EVP_MD *EVP_sha512_224(void);
9642 const EVP_MD *EVP_sha512_256(void);
9643 const EVP_MD *EVP_sha3_224(void);
9644 const EVP_MD *EVP_sha3_256(void);
9645 const EVP_MD *EVP_sha3_384(void);
9646 const EVP_MD *EVP_sha3_512(void);
9647 const EVP_MD *EVP_shake128(void);
9648 const EVP_MD *EVP_shake256(void);
9649
9650
9651 const EVP_MD *EVP_mdc2(void);
9652
9653
9654 const EVP_MD *EVP_ripemd160(void);
9655
9656
9657 const EVP_MD *EVP_whirlpool(void);
9658
9659
9660 const EVP_MD *EVP_sm3(void);
9661
9662 const EVP_CIPHER *EVP_enc_null(void);
9663
9664 const EVP_CIPHER *EVP_des_ecb(void);
9665 const EVP_CIPHER *EVP_des_ede(void);
9666 const EVP_CIPHER *EVP_des_ede3(void);
9667 const EVP_CIPHER *EVP_des_ede_ecb(void);
9668 const EVP_CIPHER *EVP_des_ede3_ecb(void);
9669 const EVP_CIPHER *EVP_des_cfb64(void);
9670
9671 const EVP_CIPHER *EVP_des_cfb1(void);
9672 const EVP_CIPHER *EVP_des_cfb8(void);
9673 const EVP_CIPHER *EVP_des_ede_cfb64(void);
9674
9675 const EVP_CIPHER *EVP_des_ede3_cfb64(void);
9676
9677 const EVP_CIPHER *EVP_des_ede3_cfb1(void);
9678 const EVP_CIPHER *EVP_des_ede3_cfb8(void);
9679 const EVP_CIPHER *EVP_des_ofb(void);
9680 const EVP_CIPHER *EVP_des_ede_ofb(void);
9681 const EVP_CIPHER *EVP_des_ede3_ofb(void);
9682 const EVP_CIPHER *EVP_des_cbc(void);
9683 const EVP_CIPHER *EVP_des_ede_cbc(void);
9684 const EVP_CIPHER *EVP_des_ede3_cbc(void);
9685 const EVP_CIPHER *EVP_desx_cbc(void);
9686 const EVP_CIPHER *EVP_des_ede3_wrap(void);
9687
9688
9689
9690
9691
9692
9693
9694 const EVP_CIPHER *EVP_rc4(void);
9695 const EVP_CIPHER *EVP_rc4_40(void);
9696
9697 const EVP_CIPHER *EVP_rc4_hmac_md5(void);
9698
9699
9700
9701 const EVP_CIPHER *EVP_idea_ecb(void);
9702 const EVP_CIPHER *EVP_idea_cfb64(void);
9703
9704 const EVP_CIPHER *EVP_idea_ofb(void);
9705 const EVP_CIPHER *EVP_idea_cbc(void);
9706
9707
9708 const EVP_CIPHER *EVP_rc2_ecb(void);
9709 const EVP_CIPHER *EVP_rc2_cbc(void);
9710 const EVP_CIPHER *EVP_rc2_40_cbc(void);
9711 const EVP_CIPHER *EVP_rc2_64_cbc(void);
9712 const EVP_CIPHER *EVP_rc2_cfb64(void);
9713
9714 const EVP_CIPHER *EVP_rc2_ofb(void);
9715
9716
9717 const EVP_CIPHER *EVP_bf_ecb(void);
9718 const EVP_CIPHER *EVP_bf_cbc(void);
9719 const EVP_CIPHER *EVP_bf_cfb64(void);
9720
9721 const EVP_CIPHER *EVP_bf_ofb(void);
9722
9723
9724 const EVP_CIPHER *EVP_cast5_ecb(void);
9725 const EVP_CIPHER *EVP_cast5_cbc(void);
9726 const EVP_CIPHER *EVP_cast5_cfb64(void);
9727
9728 const EVP_CIPHER *EVP_cast5_ofb(void);
9729 # 1021 "include/openssl/evp.h"
9730 const EVP_CIPHER *EVP_aes_128_ecb(void);
9731 const EVP_CIPHER *EVP_aes_128_cbc(void);
9732 const EVP_CIPHER *EVP_aes_128_cfb1(void);
9733 const EVP_CIPHER *EVP_aes_128_cfb8(void);
9734 const EVP_CIPHER *EVP_aes_128_cfb128(void);
9735
9736 const EVP_CIPHER *EVP_aes_128_ofb(void);
9737 const EVP_CIPHER *EVP_aes_128_ctr(void);
9738 const EVP_CIPHER *EVP_aes_128_ccm(void);
9739 const EVP_CIPHER *EVP_aes_128_gcm(void);
9740 const EVP_CIPHER *EVP_aes_128_xts(void);
9741 const EVP_CIPHER *EVP_aes_128_wrap(void);
9742 const EVP_CIPHER *EVP_aes_128_wrap_pad(void);
9743
9744 const EVP_CIPHER *EVP_aes_128_ocb(void);
9745
9746 const EVP_CIPHER *EVP_aes_192_ecb(void);
9747 const EVP_CIPHER *EVP_aes_192_cbc(void);
9748 const EVP_CIPHER *EVP_aes_192_cfb1(void);
9749 const EVP_CIPHER *EVP_aes_192_cfb8(void);
9750 const EVP_CIPHER *EVP_aes_192_cfb128(void);
9751
9752 const EVP_CIPHER *EVP_aes_192_ofb(void);
9753 const EVP_CIPHER *EVP_aes_192_ctr(void);
9754 const EVP_CIPHER *EVP_aes_192_ccm(void);
9755 const EVP_CIPHER *EVP_aes_192_gcm(void);
9756 const EVP_CIPHER *EVP_aes_192_wrap(void);
9757 const EVP_CIPHER *EVP_aes_192_wrap_pad(void);
9758
9759 const EVP_CIPHER *EVP_aes_192_ocb(void);
9760
9761 const EVP_CIPHER *EVP_aes_256_ecb(void);
9762 const EVP_CIPHER *EVP_aes_256_cbc(void);
9763 const EVP_CIPHER *EVP_aes_256_cfb1(void);
9764 const EVP_CIPHER *EVP_aes_256_cfb8(void);
9765 const EVP_CIPHER *EVP_aes_256_cfb128(void);
9766
9767 const EVP_CIPHER *EVP_aes_256_ofb(void);
9768 const EVP_CIPHER *EVP_aes_256_ctr(void);
9769 const EVP_CIPHER *EVP_aes_256_ccm(void);
9770 const EVP_CIPHER *EVP_aes_256_gcm(void);
9771 const EVP_CIPHER *EVP_aes_256_xts(void);
9772 const EVP_CIPHER *EVP_aes_256_wrap(void);
9773 const EVP_CIPHER *EVP_aes_256_wrap_pad(void);
9774
9775 const EVP_CIPHER *EVP_aes_256_ocb(void);
9776
9777 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void);
9778 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void);
9779 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void);
9780 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha256(void);
9781
9782 const EVP_CIPHER *EVP_aria_128_ecb(void);
9783 const EVP_CIPHER *EVP_aria_128_cbc(void);
9784 const EVP_CIPHER *EVP_aria_128_cfb1(void);
9785 const EVP_CIPHER *EVP_aria_128_cfb8(void);
9786 const EVP_CIPHER *EVP_aria_128_cfb128(void);
9787
9788 const EVP_CIPHER *EVP_aria_128_ctr(void);
9789 const EVP_CIPHER *EVP_aria_128_ofb(void);
9790 const EVP_CIPHER *EVP_aria_128_gcm(void);
9791 const EVP_CIPHER *EVP_aria_128_ccm(void);
9792 const EVP_CIPHER *EVP_aria_192_ecb(void);
9793 const EVP_CIPHER *EVP_aria_192_cbc(void);
9794 const EVP_CIPHER *EVP_aria_192_cfb1(void);
9795 const EVP_CIPHER *EVP_aria_192_cfb8(void);
9796 const EVP_CIPHER *EVP_aria_192_cfb128(void);
9797
9798 const EVP_CIPHER *EVP_aria_192_ctr(void);
9799 const EVP_CIPHER *EVP_aria_192_ofb(void);
9800 const EVP_CIPHER *EVP_aria_192_gcm(void);
9801 const EVP_CIPHER *EVP_aria_192_ccm(void);
9802 const EVP_CIPHER *EVP_aria_256_ecb(void);
9803 const EVP_CIPHER *EVP_aria_256_cbc(void);
9804 const EVP_CIPHER *EVP_aria_256_cfb1(void);
9805 const EVP_CIPHER *EVP_aria_256_cfb8(void);
9806 const EVP_CIPHER *EVP_aria_256_cfb128(void);
9807
9808 const EVP_CIPHER *EVP_aria_256_ctr(void);
9809 const EVP_CIPHER *EVP_aria_256_ofb(void);
9810 const EVP_CIPHER *EVP_aria_256_gcm(void);
9811 const EVP_CIPHER *EVP_aria_256_ccm(void);
9812
9813
9814 const EVP_CIPHER *EVP_camellia_128_ecb(void);
9815 const EVP_CIPHER *EVP_camellia_128_cbc(void);
9816 const EVP_CIPHER *EVP_camellia_128_cfb1(void);
9817 const EVP_CIPHER *EVP_camellia_128_cfb8(void);
9818 const EVP_CIPHER *EVP_camellia_128_cfb128(void);
9819
9820 const EVP_CIPHER *EVP_camellia_128_ofb(void);
9821 const EVP_CIPHER *EVP_camellia_128_ctr(void);
9822 const EVP_CIPHER *EVP_camellia_192_ecb(void);
9823 const EVP_CIPHER *EVP_camellia_192_cbc(void);
9824 const EVP_CIPHER *EVP_camellia_192_cfb1(void);
9825 const EVP_CIPHER *EVP_camellia_192_cfb8(void);
9826 const EVP_CIPHER *EVP_camellia_192_cfb128(void);
9827
9828 const EVP_CIPHER *EVP_camellia_192_ofb(void);
9829 const EVP_CIPHER *EVP_camellia_192_ctr(void);
9830 const EVP_CIPHER *EVP_camellia_256_ecb(void);
9831 const EVP_CIPHER *EVP_camellia_256_cbc(void);
9832 const EVP_CIPHER *EVP_camellia_256_cfb1(void);
9833 const EVP_CIPHER *EVP_camellia_256_cfb8(void);
9834 const EVP_CIPHER *EVP_camellia_256_cfb128(void);
9835
9836 const EVP_CIPHER *EVP_camellia_256_ofb(void);
9837 const EVP_CIPHER *EVP_camellia_256_ctr(void);
9838
9839
9840 const EVP_CIPHER *EVP_chacha20(void);
9841
9842 const EVP_CIPHER *EVP_chacha20_poly1305(void);
9843
9844
9845
9846
9847 const EVP_CIPHER *EVP_seed_ecb(void);
9848 const EVP_CIPHER *EVP_seed_cbc(void);
9849 const EVP_CIPHER *EVP_seed_cfb128(void);
9850
9851 const EVP_CIPHER *EVP_seed_ofb(void);
9852
9853
9854
9855 const EVP_CIPHER *EVP_sm4_ecb(void);
9856 const EVP_CIPHER *EVP_sm4_cbc(void);
9857 const EVP_CIPHER *EVP_sm4_cfb128(void);
9858
9859 const EVP_CIPHER *EVP_sm4_ofb(void);
9860 const EVP_CIPHER *EVP_sm4_ctr(void);
9861 # 1177 "include/openssl/evp.h"
9862 int EVP_add_cipher(const EVP_CIPHER *cipher);
9863 int EVP_add_digest(const EVP_MD *digest);
9864
9865 const EVP_CIPHER *EVP_get_cipherbyname(const char *name);
9866 const EVP_MD *EVP_get_digestbyname(const char *name);
9867
9868 void EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph,
9869 const char *from, const char *to, void *x),
9870 void *arg);
9871 void EVP_CIPHER_do_all_sorted(void (*fn)
9872 (const EVP_CIPHER *ciph, const char *from,
9873 const char *to, void *x), void *arg);
9874 void EVP_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx,
9875 void (*fn)(EVP_CIPHER *cipher, void *arg),
9876 void *arg);
9877
9878 void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph,
9879 const char *from, const char *to, void *x),
9880 void *arg);
9881 void EVP_MD_do_all_sorted(void (*fn)
9882 (const EVP_MD *ciph, const char *from,
9883 const char *to, void *x), void *arg);
9884 void EVP_MD_do_all_provided(OSSL_LIB_CTX *libctx,
9885 void (*fn)(EVP_MD *md, void *arg),
9886 void *arg);
9887
9888
9889
9890 EVP_MAC *EVP_MAC_fetch(OSSL_LIB_CTX *libctx, const char *algorithm,
9891 const char *properties);
9892 int EVP_MAC_up_ref(EVP_MAC *mac);
9893 void EVP_MAC_free(EVP_MAC *mac);
9894 const char *EVP_MAC_get0_name(const EVP_MAC *mac);
9895 const char *EVP_MAC_get0_description(const EVP_MAC *mac);
9896 int EVP_MAC_is_a(const EVP_MAC *mac, const char *name);
9897 const OSSL_PROVIDER *EVP_MAC_get0_provider(const EVP_MAC *mac);
9898 int EVP_MAC_get_params(EVP_MAC *mac, OSSL_PARAM params[]);
9899
9900 EVP_MAC_CTX *EVP_MAC_CTX_new(EVP_MAC *mac);
9901 void EVP_MAC_CTX_free(EVP_MAC_CTX *ctx);
9902 EVP_MAC_CTX *EVP_MAC_CTX_dup(const EVP_MAC_CTX *src);
9903 EVP_MAC *EVP_MAC_CTX_get0_mac(EVP_MAC_CTX *ctx);
9904 int EVP_MAC_CTX_get_params(EVP_MAC_CTX *ctx, OSSL_PARAM params[]);
9905 int EVP_MAC_CTX_set_params(EVP_MAC_CTX *ctx, const OSSL_PARAM params[]);
9906
9907 size_t EVP_MAC_CTX_get_mac_size(EVP_MAC_CTX *ctx);
9908 size_t EVP_MAC_CTX_get_block_size(EVP_MAC_CTX *ctx);
9909 unsigned char *EVP_Q_mac(OSSL_LIB_CTX *libctx, const char *name, const char *propq,
9910 const char *subalg, const OSSL_PARAM *params,
9911 const void *key, size_t keylen,
9912 const unsigned char *data, size_t datalen,
9913 unsigned char *out, size_t outsize, size_t *outlen);
9914 int EVP_MAC_init(EVP_MAC_CTX *ctx, const unsigned char *key, size_t keylen,
9915 const OSSL_PARAM params[]);
9916 int EVP_MAC_update(EVP_MAC_CTX *ctx, const unsigned char *data, size_t datalen);
9917 int EVP_MAC_final(EVP_MAC_CTX *ctx,
9918 unsigned char *out, size_t *outl, size_t outsize);
9919 int EVP_MAC_finalXOF(EVP_MAC_CTX *ctx, unsigned char *out, size_t outsize);
9920 const OSSL_PARAM *EVP_MAC_gettable_params(const EVP_MAC *mac);
9921 const OSSL_PARAM *EVP_MAC_gettable_ctx_params(const EVP_MAC *mac);
9922 const OSSL_PARAM *EVP_MAC_settable_ctx_params(const EVP_MAC *mac);
9923 const OSSL_PARAM *EVP_MAC_CTX_gettable_params(EVP_MAC_CTX *ctx);
9924 const OSSL_PARAM *EVP_MAC_CTX_settable_params(EVP_MAC_CTX *ctx);
9925
9926 void EVP_MAC_do_all_provided(OSSL_LIB_CTX *libctx,
9927 void (*fn)(EVP_MAC *mac, void *arg),
9928 void *arg);
9929 int EVP_MAC_names_do_all(const EVP_MAC *mac,
9930 void (*fn)(const char *name, void *data),
9931 void *data);
9932
9933
9934 EVP_RAND *EVP_RAND_fetch(OSSL_LIB_CTX *libctx, const char *algorithm,
9935 const char *properties);
9936 int EVP_RAND_up_ref(EVP_RAND *rand);
9937 void EVP_RAND_free(EVP_RAND *rand);
9938 const char *EVP_RAND_get0_name(const EVP_RAND *rand);
9939 const char *EVP_RAND_get0_description(const EVP_RAND *md);
9940 int EVP_RAND_is_a(const EVP_RAND *rand, const char *name);
9941 const OSSL_PROVIDER *EVP_RAND_get0_provider(const EVP_RAND *rand);
9942 int EVP_RAND_get_params(EVP_RAND *rand, OSSL_PARAM params[]);
9943
9944 EVP_RAND_CTX *EVP_RAND_CTX_new(EVP_RAND *rand, EVP_RAND_CTX *parent);
9945 int EVP_RAND_CTX_up_ref(EVP_RAND_CTX *ctx);
9946 void EVP_RAND_CTX_free(EVP_RAND_CTX *ctx);
9947 EVP_RAND *EVP_RAND_CTX_get0_rand(EVP_RAND_CTX *ctx);
9948 int EVP_RAND_CTX_get_params(EVP_RAND_CTX *ctx, OSSL_PARAM params[]);
9949 int EVP_RAND_CTX_set_params(EVP_RAND_CTX *ctx, const OSSL_PARAM params[]);
9950 const OSSL_PARAM *EVP_RAND_gettable_params(const EVP_RAND *rand);
9951 const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand);
9952 const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand);
9953 const OSSL_PARAM *EVP_RAND_CTX_gettable_params(EVP_RAND_CTX *ctx);
9954 const OSSL_PARAM *EVP_RAND_CTX_settable_params(EVP_RAND_CTX *ctx);
9955
9956 void EVP_RAND_do_all_provided(OSSL_LIB_CTX *libctx,
9957 void (*fn)(EVP_RAND *rand, void *arg),
9958 void *arg);
9959 int EVP_RAND_names_do_all(const EVP_RAND *rand,
9960 void (*fn)(const char *name, void *data),
9961 void *data);
9962
9963 int EVP_RAND_instantiate(EVP_RAND_CTX *ctx, unsigned int strength,
9964 int prediction_resistance,
9965 const unsigned char *pstr, size_t pstr_len,
9966 const OSSL_PARAM params[]);
9967 int EVP_RAND_uninstantiate(EVP_RAND_CTX *ctx);
9968 int EVP_RAND_generate(EVP_RAND_CTX *ctx, unsigned char *out,
9969 size_t outlen, unsigned int strength,
9970 int prediction_resistance,
9971 const unsigned char *addin, size_t addin_len);
9972 int EVP_RAND_reseed(EVP_RAND_CTX *ctx, int prediction_resistance,
9973 const unsigned char *ent, size_t ent_len,
9974 const unsigned char *addin, size_t addin_len);
9975 int EVP_RAND_nonce(EVP_RAND_CTX *ctx, unsigned char *out, size_t outlen);
9976 int EVP_RAND_enable_locking(EVP_RAND_CTX *ctx);
9977
9978 int EVP_RAND_verify_zeroization(EVP_RAND_CTX *ctx);
9979 unsigned int EVP_RAND_get_strength(EVP_RAND_CTX *ctx);
9980 int EVP_RAND_get_state(EVP_RAND_CTX *ctx);
9981
9982
9983
9984
9985
9986
9987
9988 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_PKEY_decrypt_old(unsigned char *dec_key,
9989 const unsigned char *enc_key,
9990 int enc_key_len,
9991 EVP_PKEY *private_key);
9992 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_PKEY_encrypt_old(unsigned char *enc_key,
9993 const unsigned char *key,
9994 int key_len, EVP_PKEY *pub_key);
9995
9996 int EVP_PKEY_is_a(const EVP_PKEY *pkey, const char *name);
9997 int EVP_PKEY_type_names_do_all(const EVP_PKEY *pkey,
9998 void (*fn)(const char *name, void *data),
9999 void *data);
10000 int EVP_PKEY_type(int type);
10001 int EVP_PKEY_get_id(const EVP_PKEY *pkey);
10002
10003 int EVP_PKEY_get_base_id(const EVP_PKEY *pkey);
10004
10005 int EVP_PKEY_get_bits(const EVP_PKEY *pkey);
10006
10007 int EVP_PKEY_get_security_bits(const EVP_PKEY *pkey);
10008
10009 int EVP_PKEY_get_size(const EVP_PKEY *pkey);
10010
10011 int EVP_PKEY_can_sign(const EVP_PKEY *pkey);
10012 int EVP_PKEY_set_type(EVP_PKEY *pkey, int type);
10013 int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
10014 int EVP_PKEY_set_type_by_keymgmt(EVP_PKEY *pkey, EVP_KEYMGMT *keymgmt);
10015
10016
10017 __attribute__((deprecated("Since OpenSSL " "3.0")))
10018 int EVP_PKEY_set1_engine(EVP_PKEY *pkey, ENGINE *e);
10019 __attribute__((deprecated("Since OpenSSL " "3.0")))
10020 ENGINE *EVP_PKEY_get0_engine(const EVP_PKEY *pkey);
10021
10022 __attribute__((deprecated("Since OpenSSL " "3.0")))
10023 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
10024 __attribute__((deprecated("Since OpenSSL " "3.0")))
10025 void *EVP_PKEY_get0(const EVP_PKEY *pkey);
10026 __attribute__((deprecated("Since OpenSSL " "3.0")))
10027 const unsigned char *EVP_PKEY_get0_hmac(const EVP_PKEY *pkey, size_t *len);
10028
10029 __attribute__((deprecated("Since OpenSSL " "3.0")))
10030 const unsigned char *EVP_PKEY_get0_poly1305(const EVP_PKEY *pkey, size_t *len);
10031
10032
10033 __attribute__((deprecated("Since OpenSSL " "3.0")))
10034 const unsigned char *EVP_PKEY_get0_siphash(const EVP_PKEY *pkey, size_t *len);
10035
10036
10037 struct rsa_st;
10038 __attribute__((deprecated("Since OpenSSL " "3.0")))
10039 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key);
10040 __attribute__((deprecated("Since OpenSSL " "3.0")))
10041 const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
10042 __attribute__((deprecated("Since OpenSSL " "3.0")))
10043 struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
10044
10045
10046 struct dsa_st;
10047 __attribute__((deprecated("Since OpenSSL " "3.0")))
10048 int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key);
10049 __attribute__((deprecated("Since OpenSSL " "3.0")))
10050 const struct dsa_st *EVP_PKEY_get0_DSA(const EVP_PKEY *pkey);
10051 __attribute__((deprecated("Since OpenSSL " "3.0")))
10052 struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
10053
10054
10055
10056 struct dh_st;
10057 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key);
10058 __attribute__((deprecated("Since OpenSSL " "3.0"))) const struct dh_st *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);
10059 __attribute__((deprecated("Since OpenSSL " "3.0"))) struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
10060
10061
10062
10063 struct ec_key_st;
10064 __attribute__((deprecated("Since OpenSSL " "3.0")))
10065 int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key);
10066 __attribute__((deprecated("Since OpenSSL " "3.0")))
10067 const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
10068 __attribute__((deprecated("Since OpenSSL " "3.0")))
10069 struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
10070
10071
10072
10073 EVP_PKEY *EVP_PKEY_new(void);
10074 int EVP_PKEY_up_ref(EVP_PKEY *pkey);
10075 EVP_PKEY *EVP_PKEY_dup(EVP_PKEY *pkey);
10076 void EVP_PKEY_free(EVP_PKEY *pkey);
10077 const char *EVP_PKEY_get0_description(const EVP_PKEY *pkey);
10078 const OSSL_PROVIDER *EVP_PKEY_get0_provider(const EVP_PKEY *key);
10079
10080 EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
10081 long length);
10082 int i2d_PublicKey(const EVP_PKEY *a, unsigned char **pp);
10083
10084
10085 EVP_PKEY *d2i_PrivateKey_ex(int type, EVP_PKEY **a, const unsigned char **pp,
10086 long length, OSSL_LIB_CTX *libctx,
10087 const char *propq);
10088 EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
10089 long length);
10090 EVP_PKEY *d2i_AutoPrivateKey_ex(EVP_PKEY **a, const unsigned char **pp,
10091 long length, OSSL_LIB_CTX *libctx,
10092 const char *propq);
10093 EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp,
10094 long length);
10095 int i2d_PrivateKey(const EVP_PKEY *a, unsigned char **pp);
10096
10097 int i2d_KeyParams(const EVP_PKEY *a, unsigned char **pp);
10098 EVP_PKEY *d2i_KeyParams(int type, EVP_PKEY **a, const unsigned char **pp,
10099 long length);
10100 int i2d_KeyParams_bio(BIO *bp, const EVP_PKEY *pkey);
10101 EVP_PKEY *d2i_KeyParams_bio(int type, EVP_PKEY **a, BIO *in);
10102
10103 int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
10104 int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
10105 int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode);
10106 int EVP_PKEY_parameters_eq(const EVP_PKEY *a, const EVP_PKEY *b);
10107 int EVP_PKEY_eq(const EVP_PKEY *a, const EVP_PKEY *b);
10108
10109
10110 __attribute__((deprecated("Since OpenSSL " "3.0")))
10111 int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
10112 __attribute__((deprecated("Since OpenSSL " "3.0")))
10113 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
10114
10115
10116 int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
10117 int indent, ASN1_PCTX *pctx);
10118 int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
10119 int indent, ASN1_PCTX *pctx);
10120 int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
10121 int indent, ASN1_PCTX *pctx);
10122
10123 int EVP_PKEY_print_public_fp(FILE *fp, const EVP_PKEY *pkey,
10124 int indent, ASN1_PCTX *pctx);
10125 int EVP_PKEY_print_private_fp(FILE *fp, const EVP_PKEY *pkey,
10126 int indent, ASN1_PCTX *pctx);
10127 int EVP_PKEY_print_params_fp(FILE *fp, const EVP_PKEY *pkey,
10128 int indent, ASN1_PCTX *pctx);
10129
10130
10131 int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
10132 int EVP_PKEY_get_default_digest_name(EVP_PKEY *pkey,
10133 char *mdname, size_t mdname_sz);
10134 int EVP_PKEY_digestsign_supports_digest(EVP_PKEY *pkey, OSSL_LIB_CTX *libctx,
10135 const char *name, const char *propq);
10136 # 1461 "include/openssl/evp.h"
10137 int EVP_PKEY_set1_encoded_public_key(EVP_PKEY *pkey,
10138 const unsigned char *pub, size_t publen);
10139 # 1473 "include/openssl/evp.h"
10140 size_t EVP_PKEY_get1_encoded_public_key(EVP_PKEY *pkey, unsigned char **ppub);
10141
10142
10143 int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
10144 int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
10145
10146
10147 int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
10148 int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
10149
10150
10151 int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
10152 ASN1_TYPE *param, const EVP_CIPHER *cipher,
10153 const EVP_MD *md, int en_de);
10154 int PKCS5_PBE_keyivgen_ex(EVP_CIPHER_CTX *cctx, const char *pass, int passlen,
10155 ASN1_TYPE *param, const EVP_CIPHER *cipher,
10156 const EVP_MD *md, int en_de, OSSL_LIB_CTX *libctx,
10157 const char *propq);
10158 int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
10159 const unsigned char *salt, int saltlen, int iter,
10160 int keylen, unsigned char *out);
10161 int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
10162 const unsigned char *salt, int saltlen, int iter,
10163 const EVP_MD *digest, int keylen, unsigned char *out);
10164 int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
10165 ASN1_TYPE *param, const EVP_CIPHER *cipher,
10166 const EVP_MD *md, int en_de);
10167 int PKCS5_v2_PBE_keyivgen_ex(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
10168 ASN1_TYPE *param, const EVP_CIPHER *cipher,
10169 const EVP_MD *md, int en_de,
10170 OSSL_LIB_CTX *libctx, const char *propq);
10171
10172
10173 int EVP_PBE_scrypt(const char *pass, size_t passlen,
10174 const unsigned char *salt, size_t saltlen,
10175 uint64_t N, uint64_t r, uint64_t p, uint64_t maxmem,
10176 unsigned char *key, size_t keylen);
10177 int EVP_PBE_scrypt_ex(const char *pass, size_t passlen,
10178 const unsigned char *salt, size_t saltlen,
10179 uint64_t N, uint64_t r, uint64_t p, uint64_t maxmem,
10180 unsigned char *key, size_t keylen,
10181 OSSL_LIB_CTX *ctx, const char *propq);
10182
10183 int PKCS5_v2_scrypt_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass,
10184 int passlen, ASN1_TYPE *param,
10185 const EVP_CIPHER *c, const EVP_MD *md, int en_de);
10186 int PKCS5_v2_scrypt_keyivgen_ex(EVP_CIPHER_CTX *ctx, const char *pass,
10187 int passlen, ASN1_TYPE *param,
10188 const EVP_CIPHER *c, const EVP_MD *md, int en_de,
10189 OSSL_LIB_CTX *libctx, const char *propq);
10190
10191
10192 void PKCS5_PBE_add(void);
10193
10194 int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
10195 ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
10196
10197 int EVP_PBE_CipherInit_ex(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
10198 ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de,
10199 OSSL_LIB_CTX *libctx, const char *propq);
10200 # 1543 "include/openssl/evp.h"
10201 int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
10202 int md_nid, EVP_PBE_KEYGEN *keygen);
10203 int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
10204 EVP_PBE_KEYGEN *keygen);
10205 int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid,
10206 EVP_PBE_KEYGEN **pkeygen);
10207 int EVP_PBE_find_ex(int type, int pbe_nid, int *pcnid, int *pmnid,
10208 EVP_PBE_KEYGEN **pkeygen, EVP_PBE_KEYGEN_EX **pkeygen_ex);
10209 void EVP_PBE_cleanup(void);
10210 int EVP_PBE_get(int *ptype, int *ppbe_nid, size_t num);
10211 # 1569 "include/openssl/evp.h"
10212 int EVP_PKEY_asn1_get_count(void);
10213 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
10214 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
10215 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
10216 const char *str, int len);
10217 int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
10218 int EVP_PKEY_asn1_add_alias(int to, int from);
10219 int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,
10220 int *ppkey_flags, const char **pinfo,
10221 const char **ppem_str,
10222 const EVP_PKEY_ASN1_METHOD *ameth);
10223
10224 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(const EVP_PKEY *pkey);
10225 EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags,
10226 const char *pem_str,
10227 const char *info);
10228 void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
10229 const EVP_PKEY_ASN1_METHOD *src);
10230 void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);
10231 void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
10232 int (*pub_decode) (EVP_PKEY *pk,
10233 const X509_PUBKEY *pub),
10234 int (*pub_encode) (X509_PUBKEY *pub,
10235 const EVP_PKEY *pk),
10236 int (*pub_cmp) (const EVP_PKEY *a,
10237 const EVP_PKEY *b),
10238 int (*pub_print) (BIO *out,
10239 const EVP_PKEY *pkey,
10240 int indent, ASN1_PCTX *pctx),
10241 int (*pkey_size) (const EVP_PKEY *pk),
10242 int (*pkey_bits) (const EVP_PKEY *pk));
10243 void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
10244 int (*priv_decode) (EVP_PKEY *pk,
10245 const PKCS8_PRIV_KEY_INFO
10246 *p8inf),
10247 int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8,
10248 const EVP_PKEY *pk),
10249 int (*priv_print) (BIO *out,
10250 const EVP_PKEY *pkey,
10251 int indent,
10252 ASN1_PCTX *pctx));
10253 void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
10254 int (*param_decode) (EVP_PKEY *pkey,
10255 const unsigned char **pder,
10256 int derlen),
10257 int (*param_encode) (const EVP_PKEY *pkey,
10258 unsigned char **pder),
10259 int (*param_missing) (const EVP_PKEY *pk),
10260 int (*param_copy) (EVP_PKEY *to,
10261 const EVP_PKEY *from),
10262 int (*param_cmp) (const EVP_PKEY *a,
10263 const EVP_PKEY *b),
10264 int (*param_print) (BIO *out,
10265 const EVP_PKEY *pkey,
10266 int indent,
10267 ASN1_PCTX *pctx));
10268
10269 void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
10270 void (*pkey_free) (EVP_PKEY *pkey));
10271 void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
10272 int (*pkey_ctrl) (EVP_PKEY *pkey, int op,
10273 long arg1, void *arg2));
10274 void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
10275 int (*item_verify) (EVP_MD_CTX *ctx,
10276 const ASN1_ITEM *it,
10277 const void *data,
10278 const X509_ALGOR *a,
10279 const ASN1_BIT_STRING *sig,
10280 EVP_PKEY *pkey),
10281 int (*item_sign) (EVP_MD_CTX *ctx,
10282 const ASN1_ITEM *it,
10283 const void *data,
10284 X509_ALGOR *alg1,
10285 X509_ALGOR *alg2,
10286 ASN1_BIT_STRING *sig));
10287
10288 void EVP_PKEY_asn1_set_siginf(EVP_PKEY_ASN1_METHOD *ameth,
10289 int (*siginf_set) (X509_SIG_INFO *siginf,
10290 const X509_ALGOR *alg,
10291 const ASN1_STRING *sig));
10292
10293 void EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth,
10294 int (*pkey_check) (const EVP_PKEY *pk));
10295
10296 void EVP_PKEY_asn1_set_public_check(EVP_PKEY_ASN1_METHOD *ameth,
10297 int (*pkey_pub_check) (const EVP_PKEY *pk));
10298
10299 void EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth,
10300 int (*pkey_param_check) (const EVP_PKEY *pk));
10301
10302 void EVP_PKEY_asn1_set_set_priv_key(EVP_PKEY_ASN1_METHOD *ameth,
10303 int (*set_priv_key) (EVP_PKEY *pk,
10304 const unsigned char
10305 *priv,
10306 size_t len));
10307 void EVP_PKEY_asn1_set_set_pub_key(EVP_PKEY_ASN1_METHOD *ameth,
10308 int (*set_pub_key) (EVP_PKEY *pk,
10309 const unsigned char *pub,
10310 size_t len));
10311 void EVP_PKEY_asn1_set_get_priv_key(EVP_PKEY_ASN1_METHOD *ameth,
10312 int (*get_priv_key) (const EVP_PKEY *pk,
10313 unsigned char *priv,
10314 size_t *len));
10315 void EVP_PKEY_asn1_set_get_pub_key(EVP_PKEY_ASN1_METHOD *ameth,
10316 int (*get_pub_key) (const EVP_PKEY *pk,
10317 unsigned char *pub,
10318 size_t *len));
10319
10320 void EVP_PKEY_asn1_set_security_bits(EVP_PKEY_ASN1_METHOD *ameth,
10321 int (*pkey_security_bits) (const EVP_PKEY
10322 *pk));
10323
10324 int EVP_PKEY_CTX_get_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
10325 int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
10326
10327 int EVP_PKEY_CTX_set1_id(EVP_PKEY_CTX *ctx, const void *id, int len);
10328 int EVP_PKEY_CTX_get1_id(EVP_PKEY_CTX *ctx, void *id);
10329 int EVP_PKEY_CTX_get1_id_len(EVP_PKEY_CTX *ctx, size_t *id_len);
10330
10331 int EVP_PKEY_CTX_set_kem_op(EVP_PKEY_CTX *ctx, const char *op);
10332
10333 const char *EVP_PKEY_get0_type_name(const EVP_PKEY *key);
10334 # 1721 "include/openssl/evp.h"
10335 int EVP_PKEY_CTX_set_mac_key(EVP_PKEY_CTX *ctx, const unsigned char *key,
10336 int keylen);
10337 # 1753 "include/openssl/evp.h"
10338 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
10339 __attribute__((deprecated("Since OpenSSL " "3.0"))) EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags);
10340 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
10341 const EVP_PKEY_METHOD *meth);
10342 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst,
10343 const EVP_PKEY_METHOD *src);
10344 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
10345 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
10346 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_PKEY_meth_remove(const EVP_PKEY_METHOD *pmeth);
10347 __attribute__((deprecated("Since OpenSSL " "3.0"))) size_t EVP_PKEY_meth_get_count(void);
10348 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EVP_PKEY_METHOD *EVP_PKEY_meth_get0(size_t idx);
10349
10350
10351 EVP_KEYMGMT *EVP_KEYMGMT_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
10352 const char *properties);
10353 int EVP_KEYMGMT_up_ref(EVP_KEYMGMT *keymgmt);
10354 void EVP_KEYMGMT_free(EVP_KEYMGMT *keymgmt);
10355 const OSSL_PROVIDER *EVP_KEYMGMT_get0_provider(const EVP_KEYMGMT *keymgmt);
10356 const char *EVP_KEYMGMT_get0_name(const EVP_KEYMGMT *keymgmt);
10357 const char *EVP_KEYMGMT_get0_description(const EVP_KEYMGMT *keymgmt);
10358 int EVP_KEYMGMT_is_a(const EVP_KEYMGMT *keymgmt, const char *name);
10359 void EVP_KEYMGMT_do_all_provided(OSSL_LIB_CTX *libctx,
10360 void (*fn)(EVP_KEYMGMT *keymgmt, void *arg),
10361 void *arg);
10362 int EVP_KEYMGMT_names_do_all(const EVP_KEYMGMT *keymgmt,
10363 void (*fn)(const char *name, void *data),
10364 void *data);
10365 const OSSL_PARAM *EVP_KEYMGMT_gettable_params(const EVP_KEYMGMT *keymgmt);
10366 const OSSL_PARAM *EVP_KEYMGMT_settable_params(const EVP_KEYMGMT *keymgmt);
10367 const OSSL_PARAM *EVP_KEYMGMT_gen_settable_params(const EVP_KEYMGMT *keymgmt);
10368
10369 EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
10370 EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
10371 EVP_PKEY_CTX *EVP_PKEY_CTX_new_from_name(OSSL_LIB_CTX *libctx,
10372 const char *name,
10373 const char *propquery);
10374 EVP_PKEY_CTX *EVP_PKEY_CTX_new_from_pkey(OSSL_LIB_CTX *libctx,
10375 EVP_PKEY *pkey, const char *propquery);
10376 EVP_PKEY_CTX *EVP_PKEY_CTX_dup(const EVP_PKEY_CTX *ctx);
10377 void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
10378 int EVP_PKEY_CTX_is_a(EVP_PKEY_CTX *ctx, const char *keytype);
10379
10380 int EVP_PKEY_CTX_get_params(EVP_PKEY_CTX *ctx, OSSL_PARAM *params);
10381 const OSSL_PARAM *EVP_PKEY_CTX_gettable_params(const EVP_PKEY_CTX *ctx);
10382 int EVP_PKEY_CTX_set_params(EVP_PKEY_CTX *ctx, const OSSL_PARAM *params);
10383 const OSSL_PARAM *EVP_PKEY_CTX_settable_params(const EVP_PKEY_CTX *ctx);
10384 int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
10385 int cmd, int p1, void *p2);
10386 int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
10387 const char *value);
10388 int EVP_PKEY_CTX_ctrl_uint64(EVP_PKEY_CTX *ctx, int keytype, int optype,
10389 int cmd, uint64_t value);
10390
10391 int EVP_PKEY_CTX_str2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *str);
10392 int EVP_PKEY_CTX_hex2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *hex);
10393
10394 int EVP_PKEY_CTX_md(EVP_PKEY_CTX *ctx, int optype, int cmd, const char *md);
10395
10396 int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx);
10397 void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen);
10398
10399 EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
10400 const unsigned char *key, int keylen);
10401 EVP_PKEY *EVP_PKEY_new_raw_private_key_ex(OSSL_LIB_CTX *libctx,
10402 const char *keytype,
10403 const char *propq,
10404 const unsigned char *priv, size_t len);
10405 EVP_PKEY *EVP_PKEY_new_raw_private_key(int type, ENGINE *e,
10406 const unsigned char *priv,
10407 size_t len);
10408 EVP_PKEY *EVP_PKEY_new_raw_public_key_ex(OSSL_LIB_CTX *libctx,
10409 const char *keytype, const char *propq,
10410 const unsigned char *pub, size_t len);
10411 EVP_PKEY *EVP_PKEY_new_raw_public_key(int type, ENGINE *e,
10412 const unsigned char *pub,
10413 size_t len);
10414 int EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, unsigned char *priv,
10415 size_t *len);
10416 int EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, unsigned char *pub,
10417 size_t *len);
10418
10419
10420 __attribute__((deprecated("Since OpenSSL " "3.0")))
10421 EVP_PKEY *EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv,
10422 size_t len, const EVP_CIPHER *cipher);
10423
10424
10425 void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);
10426 void *EVP_PKEY_CTX_get_data(const EVP_PKEY_CTX *ctx);
10427 EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
10428
10429 EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);
10430
10431 void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);
10432 void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
10433
10434 void EVP_SIGNATURE_free(EVP_SIGNATURE *signature);
10435 int EVP_SIGNATURE_up_ref(EVP_SIGNATURE *signature);
10436 OSSL_PROVIDER *EVP_SIGNATURE_get0_provider(const EVP_SIGNATURE *signature);
10437 EVP_SIGNATURE *EVP_SIGNATURE_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
10438 const char *properties);
10439 int EVP_SIGNATURE_is_a(const EVP_SIGNATURE *signature, const char *name);
10440 const char *EVP_SIGNATURE_get0_name(const EVP_SIGNATURE *signature);
10441 const char *EVP_SIGNATURE_get0_description(const EVP_SIGNATURE *signature);
10442 void EVP_SIGNATURE_do_all_provided(OSSL_LIB_CTX *libctx,
10443 void (*fn)(EVP_SIGNATURE *signature,
10444 void *data),
10445 void *data);
10446 int EVP_SIGNATURE_names_do_all(const EVP_SIGNATURE *signature,
10447 void (*fn)(const char *name, void *data),
10448 void *data);
10449 const OSSL_PARAM *EVP_SIGNATURE_gettable_ctx_params(const EVP_SIGNATURE *sig);
10450 const OSSL_PARAM *EVP_SIGNATURE_settable_ctx_params(const EVP_SIGNATURE *sig);
10451
10452 void EVP_ASYM_CIPHER_free(EVP_ASYM_CIPHER *cipher);
10453 int EVP_ASYM_CIPHER_up_ref(EVP_ASYM_CIPHER *cipher);
10454 OSSL_PROVIDER *EVP_ASYM_CIPHER_get0_provider(const EVP_ASYM_CIPHER *cipher);
10455 EVP_ASYM_CIPHER *EVP_ASYM_CIPHER_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
10456 const char *properties);
10457 int EVP_ASYM_CIPHER_is_a(const EVP_ASYM_CIPHER *cipher, const char *name);
10458 const char *EVP_ASYM_CIPHER_get0_name(const EVP_ASYM_CIPHER *cipher);
10459 const char *EVP_ASYM_CIPHER_get0_description(const EVP_ASYM_CIPHER *cipher);
10460 void EVP_ASYM_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx,
10461 void (*fn)(EVP_ASYM_CIPHER *cipher,
10462 void *arg),
10463 void *arg);
10464 int EVP_ASYM_CIPHER_names_do_all(const EVP_ASYM_CIPHER *cipher,
10465 void (*fn)(const char *name, void *data),
10466 void *data);
10467 const OSSL_PARAM *EVP_ASYM_CIPHER_gettable_ctx_params(const EVP_ASYM_CIPHER *ciph);
10468 const OSSL_PARAM *EVP_ASYM_CIPHER_settable_ctx_params(const EVP_ASYM_CIPHER *ciph);
10469
10470 void EVP_KEM_free(EVP_KEM *wrap);
10471 int EVP_KEM_up_ref(EVP_KEM *wrap);
10472 OSSL_PROVIDER *EVP_KEM_get0_provider(const EVP_KEM *wrap);
10473 EVP_KEM *EVP_KEM_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
10474 const char *properties);
10475 int EVP_KEM_is_a(const EVP_KEM *wrap, const char *name);
10476 const char *EVP_KEM_get0_name(const EVP_KEM *wrap);
10477 const char *EVP_KEM_get0_description(const EVP_KEM *wrap);
10478 void EVP_KEM_do_all_provided(OSSL_LIB_CTX *libctx,
10479 void (*fn)(EVP_KEM *wrap, void *arg), void *arg);
10480 int EVP_KEM_names_do_all(const EVP_KEM *wrap,
10481 void (*fn)(const char *name, void *data), void *data);
10482 const OSSL_PARAM *EVP_KEM_gettable_ctx_params(const EVP_KEM *kem);
10483 const OSSL_PARAM *EVP_KEM_settable_ctx_params(const EVP_KEM *kem);
10484
10485 int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
10486 int EVP_PKEY_sign_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
10487 int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
10488 unsigned char *sig, size_t *siglen,
10489 const unsigned char *tbs, size_t tbslen);
10490 int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
10491 int EVP_PKEY_verify_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
10492 int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
10493 const unsigned char *sig, size_t siglen,
10494 const unsigned char *tbs, size_t tbslen);
10495 int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
10496 int EVP_PKEY_verify_recover_init_ex(EVP_PKEY_CTX *ctx,
10497 const OSSL_PARAM params[]);
10498 int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
10499 unsigned char *rout, size_t *routlen,
10500 const unsigned char *sig, size_t siglen);
10501 int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
10502 int EVP_PKEY_encrypt_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
10503 int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
10504 unsigned char *out, size_t *outlen,
10505 const unsigned char *in, size_t inlen);
10506 int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
10507 int EVP_PKEY_decrypt_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
10508 int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
10509 unsigned char *out, size_t *outlen,
10510 const unsigned char *in, size_t inlen);
10511
10512 int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
10513 int EVP_PKEY_derive_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
10514 int EVP_PKEY_derive_set_peer_ex(EVP_PKEY_CTX *ctx, EVP_PKEY *peer,
10515 int validate_peer);
10516 int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
10517 int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
10518
10519 int EVP_PKEY_encapsulate_init(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
10520 int EVP_PKEY_auth_encapsulate_init(EVP_PKEY_CTX *ctx, EVP_PKEY *authpriv,
10521 const OSSL_PARAM params[]);
10522 int EVP_PKEY_encapsulate(EVP_PKEY_CTX *ctx,
10523 unsigned char *wrappedkey, size_t *wrappedkeylen,
10524 unsigned char *genkey, size_t *genkeylen);
10525 int EVP_PKEY_decapsulate_init(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
10526 int EVP_PKEY_auth_decapsulate_init(EVP_PKEY_CTX *ctx, EVP_PKEY *authpub,
10527 const OSSL_PARAM params[]);
10528 int EVP_PKEY_decapsulate(EVP_PKEY_CTX *ctx,
10529 unsigned char *unwrapped, size_t *unwrappedlen,
10530 const unsigned char *wrapped, size_t wrappedlen);
10531 typedef int EVP_PKEY_gen_cb(EVP_PKEY_CTX *ctx);
10532
10533 int EVP_PKEY_fromdata_init(EVP_PKEY_CTX *ctx);
10534 int EVP_PKEY_fromdata(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey, int selection,
10535 OSSL_PARAM param[]);
10536 const OSSL_PARAM *EVP_PKEY_fromdata_settable(EVP_PKEY_CTX *ctx, int selection);
10537
10538 int EVP_PKEY_todata(const EVP_PKEY *pkey, int selection, OSSL_PARAM **params);
10539 int EVP_PKEY_export(const EVP_PKEY *pkey, int selection,
10540 OSSL_CALLBACK *export_cb, void *export_cbarg);
10541
10542 const OSSL_PARAM *EVP_PKEY_gettable_params(const EVP_PKEY *pkey);
10543 int EVP_PKEY_get_params(const EVP_PKEY *pkey, OSSL_PARAM params[]);
10544 int EVP_PKEY_get_int_param(const EVP_PKEY *pkey, const char *key_name,
10545 int *out);
10546 int EVP_PKEY_get_size_t_param(const EVP_PKEY *pkey, const char *key_name,
10547 size_t *out);
10548 int EVP_PKEY_get_bn_param(const EVP_PKEY *pkey, const char *key_name,
10549 BIGNUM **bn);
10550 int EVP_PKEY_get_utf8_string_param(const EVP_PKEY *pkey, const char *key_name,
10551 char *str, size_t max_buf_sz, size_t *out_sz);
10552 int EVP_PKEY_get_octet_string_param(const EVP_PKEY *pkey, const char *key_name,
10553 unsigned char *buf, size_t max_buf_sz,
10554 size_t *out_sz);
10555
10556 const OSSL_PARAM *EVP_PKEY_settable_params(const EVP_PKEY *pkey);
10557 int EVP_PKEY_set_params(EVP_PKEY *pkey, OSSL_PARAM params[]);
10558 int EVP_PKEY_set_int_param(EVP_PKEY *pkey, const char *key_name, int in);
10559 int EVP_PKEY_set_size_t_param(EVP_PKEY *pkey, const char *key_name, size_t in);
10560 int EVP_PKEY_set_bn_param(EVP_PKEY *pkey, const char *key_name,
10561 const BIGNUM *bn);
10562 int EVP_PKEY_set_utf8_string_param(EVP_PKEY *pkey, const char *key_name,
10563 const char *str);
10564 int EVP_PKEY_set_octet_string_param(EVP_PKEY *pkey, const char *key_name,
10565 const unsigned char *buf, size_t bsize);
10566
10567 int EVP_PKEY_get_ec_point_conv_form(const EVP_PKEY *pkey);
10568 int EVP_PKEY_get_field_type(const EVP_PKEY *pkey);
10569
10570 EVP_PKEY *EVP_PKEY_Q_keygen(OSSL_LIB_CTX *libctx, const char *propq,
10571 const char *type, ...);
10572 int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
10573 int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
10574 int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
10575 int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
10576 int EVP_PKEY_generate(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
10577 int EVP_PKEY_check(EVP_PKEY_CTX *ctx);
10578 int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx);
10579 int EVP_PKEY_public_check_quick(EVP_PKEY_CTX *ctx);
10580 int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
10581 int EVP_PKEY_param_check_quick(EVP_PKEY_CTX *ctx);
10582 int EVP_PKEY_private_check(EVP_PKEY_CTX *ctx);
10583 int EVP_PKEY_pairwise_check(EVP_PKEY_CTX *ctx);
10584
10585
10586
10587 int EVP_PKEY_set_ex_data(EVP_PKEY *key, int idx, void *arg);
10588 void *EVP_PKEY_get_ex_data(const EVP_PKEY *key, int idx);
10589
10590 void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
10591 EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
10592
10593 int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);
10594
10595 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,
10596 int (*init) (EVP_PKEY_CTX *ctx));
10597 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_copy
10598 (EVP_PKEY_METHOD *pmeth, int (*copy) (EVP_PKEY_CTX *dst,
10599 const EVP_PKEY_CTX *src));
10600 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_cleanup
10601 (EVP_PKEY_METHOD *pmeth, void (*cleanup) (EVP_PKEY_CTX *ctx));
10602 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_paramgen
10603 (EVP_PKEY_METHOD *pmeth, int (*paramgen_init) (EVP_PKEY_CTX *ctx),
10604 int (*paramgen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey));
10605 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_keygen
10606 (EVP_PKEY_METHOD *pmeth, int (*keygen_init) (EVP_PKEY_CTX *ctx),
10607 int (*keygen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey));
10608 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_sign
10609 (EVP_PKEY_METHOD *pmeth, int (*sign_init) (EVP_PKEY_CTX *ctx),
10610 int (*sign) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
10611 const unsigned char *tbs, size_t tbslen));
10612 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_verify
10613 (EVP_PKEY_METHOD *pmeth, int (*verify_init) (EVP_PKEY_CTX *ctx),
10614 int (*verify) (EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen,
10615 const unsigned char *tbs, size_t tbslen));
10616 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_verify_recover
10617 (EVP_PKEY_METHOD *pmeth, int (*verify_recover_init) (EVP_PKEY_CTX *ctx),
10618 int (*verify_recover) (EVP_PKEY_CTX *ctx, unsigned char *sig,
10619 size_t *siglen, const unsigned char *tbs,
10620 size_t tbslen));
10621 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_signctx
10622 (EVP_PKEY_METHOD *pmeth, int (*signctx_init) (EVP_PKEY_CTX *ctx,
10623 EVP_MD_CTX *mctx),
10624 int (*signctx) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
10625 EVP_MD_CTX *mctx));
10626 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_verifyctx
10627 (EVP_PKEY_METHOD *pmeth, int (*verifyctx_init) (EVP_PKEY_CTX *ctx,
10628 EVP_MD_CTX *mctx),
10629 int (*verifyctx) (EVP_PKEY_CTX *ctx, const unsigned char *sig, int siglen,
10630 EVP_MD_CTX *mctx));
10631 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_encrypt
10632 (EVP_PKEY_METHOD *pmeth, int (*encrypt_init) (EVP_PKEY_CTX *ctx),
10633 int (*encryptfn) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
10634 const unsigned char *in, size_t inlen));
10635 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_decrypt
10636 (EVP_PKEY_METHOD *pmeth, int (*decrypt_init) (EVP_PKEY_CTX *ctx),
10637 int (*decrypt) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
10638 const unsigned char *in, size_t inlen));
10639 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_derive
10640 (EVP_PKEY_METHOD *pmeth, int (*derive_init) (EVP_PKEY_CTX *ctx),
10641 int (*derive) (EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen));
10642 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_ctrl
10643 (EVP_PKEY_METHOD *pmeth, int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
10644 void *p2),
10645 int (*ctrl_str) (EVP_PKEY_CTX *ctx, const char *type, const char *value));
10646 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_digestsign
10647 (EVP_PKEY_METHOD *pmeth,
10648 int (*digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen,
10649 const unsigned char *tbs, size_t tbslen));
10650 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_digestverify
10651 (EVP_PKEY_METHOD *pmeth,
10652 int (*digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig,
10653 size_t siglen, const unsigned char *tbs,
10654 size_t tbslen));
10655 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_check
10656 (EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey));
10657 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_public_check
10658 (EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey));
10659 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_param_check
10660 (EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey));
10661 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_digest_custom
10662 (EVP_PKEY_METHOD *pmeth, int (*digest_custom) (EVP_PKEY_CTX *ctx,
10663 EVP_MD_CTX *mctx));
10664 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_init
10665 (const EVP_PKEY_METHOD *pmeth, int (**pinit) (EVP_PKEY_CTX *ctx));
10666 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_copy
10667 (const EVP_PKEY_METHOD *pmeth, int (**pcopy) (EVP_PKEY_CTX *dst,
10668 const EVP_PKEY_CTX *src));
10669 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_cleanup
10670 (const EVP_PKEY_METHOD *pmeth, void (**pcleanup) (EVP_PKEY_CTX *ctx));
10671 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_paramgen
10672 (const EVP_PKEY_METHOD *pmeth, int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
10673 int (**pparamgen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey));
10674 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_keygen
10675 (const EVP_PKEY_METHOD *pmeth, int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
10676 int (**pkeygen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey));
10677 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_sign
10678 (const EVP_PKEY_METHOD *pmeth, int (**psign_init) (EVP_PKEY_CTX *ctx),
10679 int (**psign) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
10680 const unsigned char *tbs, size_t tbslen));
10681 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_verify
10682 (const EVP_PKEY_METHOD *pmeth, int (**pverify_init) (EVP_PKEY_CTX *ctx),
10683 int (**pverify) (EVP_PKEY_CTX *ctx, const unsigned char *sig,
10684 size_t siglen, const unsigned char *tbs, size_t tbslen));
10685 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_verify_recover
10686 (const EVP_PKEY_METHOD *pmeth,
10687 int (**pverify_recover_init) (EVP_PKEY_CTX *ctx),
10688 int (**pverify_recover) (EVP_PKEY_CTX *ctx, unsigned char *sig,
10689 size_t *siglen, const unsigned char *tbs,
10690 size_t tbslen));
10691 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_signctx
10692 (const EVP_PKEY_METHOD *pmeth,
10693 int (**psignctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx),
10694 int (**psignctx) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
10695 EVP_MD_CTX *mctx));
10696 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_verifyctx
10697 (const EVP_PKEY_METHOD *pmeth,
10698 int (**pverifyctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx),
10699 int (**pverifyctx) (EVP_PKEY_CTX *ctx, const unsigned char *sig,
10700 int siglen, EVP_MD_CTX *mctx));
10701 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_encrypt
10702 (const EVP_PKEY_METHOD *pmeth, int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
10703 int (**pencryptfn) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
10704 const unsigned char *in, size_t inlen));
10705 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_decrypt
10706 (const EVP_PKEY_METHOD *pmeth, int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
10707 int (**pdecrypt) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
10708 const unsigned char *in, size_t inlen));
10709 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_derive
10710 (const EVP_PKEY_METHOD *pmeth, int (**pderive_init) (EVP_PKEY_CTX *ctx),
10711 int (**pderive) (EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen));
10712 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_ctrl
10713 (const EVP_PKEY_METHOD *pmeth,
10714 int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1, void *p2),
10715 int (**pctrl_str) (EVP_PKEY_CTX *ctx, const char *type,
10716 const char *value));
10717 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_digestsign
10718 (const EVP_PKEY_METHOD *pmeth,
10719 int (**digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen,
10720 const unsigned char *tbs, size_t tbslen));
10721 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_digestverify
10722 (const EVP_PKEY_METHOD *pmeth,
10723 int (**digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig,
10724 size_t siglen, const unsigned char *tbs,
10725 size_t tbslen));
10726 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_check
10727 (const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey));
10728 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_public_check
10729 (const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey));
10730 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_param_check
10731 (const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey));
10732 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_digest_custom
10733 (const EVP_PKEY_METHOD *pmeth,
10734 int (**pdigest_custom) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx));
10735
10736
10737 void EVP_KEYEXCH_free(EVP_KEYEXCH *exchange);
10738 int EVP_KEYEXCH_up_ref(EVP_KEYEXCH *exchange);
10739 EVP_KEYEXCH *EVP_KEYEXCH_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
10740 const char *properties);
10741 OSSL_PROVIDER *EVP_KEYEXCH_get0_provider(const EVP_KEYEXCH *exchange);
10742 int EVP_KEYEXCH_is_a(const EVP_KEYEXCH *keyexch, const char *name);
10743 const char *EVP_KEYEXCH_get0_name(const EVP_KEYEXCH *keyexch);
10744 const char *EVP_KEYEXCH_get0_description(const EVP_KEYEXCH *keyexch);
10745 void EVP_KEYEXCH_do_all_provided(OSSL_LIB_CTX *libctx,
10746 void (*fn)(EVP_KEYEXCH *keyexch, void *data),
10747 void *data);
10748 int EVP_KEYEXCH_names_do_all(const EVP_KEYEXCH *keyexch,
10749 void (*fn)(const char *name, void *data),
10750 void *data);
10751 const OSSL_PARAM *EVP_KEYEXCH_gettable_ctx_params(const EVP_KEYEXCH *keyexch);
10752 const OSSL_PARAM *EVP_KEYEXCH_settable_ctx_params(const EVP_KEYEXCH *keyexch);
10753
10754 void EVP_add_alg_module(void);
10755
10756 int EVP_PKEY_CTX_set_group_name(EVP_PKEY_CTX *ctx, const char *name);
10757 int EVP_PKEY_CTX_get_group_name(EVP_PKEY_CTX *ctx, char *name, size_t namelen);
10758 int EVP_PKEY_get_group_name(const EVP_PKEY *pkey, char *name, size_t name_sz,
10759 size_t *gname_len);
10760
10761 OSSL_LIB_CTX *EVP_PKEY_CTX_get0_libctx(EVP_PKEY_CTX *ctx);
10762 const char *EVP_PKEY_CTX_get0_propq(const EVP_PKEY_CTX *ctx);
10763 const OSSL_PROVIDER *EVP_PKEY_CTX_get0_provider(const EVP_PKEY_CTX *ctx);
10764 # 30 "include/openssl/x509.h" 2
10765
10766
10767
10768 # 1 "include/openssl/ec.h" 1
10769 # 13 "include/openssl/ec.h"
10770
10771
10772
10773
10774
10775
10776
10777
10778 # 1 "include/openssl/types.h" 1
10779 # 22 "include/openssl/ec.h" 2
10780 # 33 "include/openssl/ec.h"
10781 int EVP_PKEY_CTX_set_ec_paramgen_curve_nid(EVP_PKEY_CTX *ctx, int nid);
10782 int EVP_PKEY_CTX_set_ec_param_enc(EVP_PKEY_CTX *ctx, int param_enc);
10783 int EVP_PKEY_CTX_set_ecdh_cofactor_mode(EVP_PKEY_CTX *ctx, int cofactor_mode);
10784 int EVP_PKEY_CTX_get_ecdh_cofactor_mode(EVP_PKEY_CTX *ctx);
10785
10786 int EVP_PKEY_CTX_set_ecdh_kdf_type(EVP_PKEY_CTX *ctx, int kdf);
10787 int EVP_PKEY_CTX_get_ecdh_kdf_type(EVP_PKEY_CTX *ctx);
10788
10789 int EVP_PKEY_CTX_set_ecdh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
10790 int EVP_PKEY_CTX_get_ecdh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
10791
10792 int EVP_PKEY_CTX_set_ecdh_kdf_outlen(EVP_PKEY_CTX *ctx, int len);
10793 int EVP_PKEY_CTX_get_ecdh_kdf_outlen(EVP_PKEY_CTX *ctx, int *len);
10794
10795 int EVP_PKEY_CTX_set0_ecdh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char *ukm,
10796 int len);
10797
10798 __attribute__((deprecated("Since OpenSSL " "3.0")))
10799 int EVP_PKEY_CTX_get0_ecdh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **ukm);
10800 # 78 "include/openssl/ec.h"
10801 typedef enum {
10802
10803
10804 POINT_CONVERSION_COMPRESSED = 2,
10805
10806 POINT_CONVERSION_UNCOMPRESSED = 4,
10807
10808
10809 POINT_CONVERSION_HYBRID = 6
10810 } point_conversion_form_t;
10811
10812 const char *OSSL_EC_curve_nid2name(int nid);
10813 # 100 "include/openssl/ec.h"
10814 # 1 "include/openssl/ecerr.h" 1
10815 # 13 "include/openssl/ecerr.h"
10816
10817 # 101 "include/openssl/ec.h" 2
10818
10819
10820
10821
10822
10823
10824
10825 typedef struct ec_method_st EC_METHOD;
10826
10827 typedef struct ec_group_st EC_GROUP;
10828 typedef struct ec_point_st EC_POINT;
10829 typedef struct ecpk_parameters_st ECPKPARAMETERS;
10830 typedef struct ec_parameters_st ECPARAMETERS;
10831 # 124 "include/openssl/ec.h"
10832 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_METHOD *EC_GFp_simple_method(void);
10833
10834
10835
10836
10837 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_METHOD *EC_GFp_mont_method(void);
10838
10839
10840
10841
10842 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_METHOD *EC_GFp_nist_method(void);
10843 # 161 "include/openssl/ec.h"
10844 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_METHOD *EC_GF2m_simple_method(void);
10845 # 174 "include/openssl/ec.h"
10846 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
10847
10848
10849
10850
10851 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_GROUP_clear_free(EC_GROUP *group);
10852
10853
10854
10855
10856
10857 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);
10858
10859
10860
10861
10862
10863 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_METHOD_get_field_type(const EC_METHOD *meth);
10864
10865
10866
10867
10868
10869 void EC_GROUP_free(EC_GROUP *group);
10870
10871
10872
10873
10874
10875
10876 int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
10877
10878
10879
10880
10881
10882
10883 EC_GROUP *EC_GROUP_dup(const EC_GROUP *src);
10884 # 221 "include/openssl/ec.h"
10885 int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
10886 const BIGNUM *order, const BIGNUM *cofactor);
10887
10888
10889
10890
10891
10892 const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
10893
10894
10895
10896
10897
10898 BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group);
10899
10900
10901
10902
10903
10904
10905
10906 int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
10907
10908
10909
10910
10911
10912 const BIGNUM *EC_GROUP_get0_order(const EC_GROUP *group);
10913
10914
10915
10916
10917
10918 int EC_GROUP_order_bits(const EC_GROUP *group);
10919
10920
10921
10922
10923
10924
10925
10926 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
10927 BN_CTX *ctx);
10928
10929
10930
10931
10932
10933 const BIGNUM *EC_GROUP_get0_cofactor(const EC_GROUP *group);
10934
10935
10936
10937
10938
10939 void EC_GROUP_set_curve_name(EC_GROUP *group, int nid);
10940
10941
10942
10943
10944
10945 int EC_GROUP_get_curve_name(const EC_GROUP *group);
10946
10947
10948
10949
10950
10951 const BIGNUM *EC_GROUP_get0_field(const EC_GROUP *group);
10952
10953
10954
10955
10956
10957 int EC_GROUP_get_field_type(const EC_GROUP *group);
10958
10959 void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);
10960 int EC_GROUP_get_asn1_flag(const EC_GROUP *group);
10961
10962 void EC_GROUP_set_point_conversion_form(EC_GROUP *group,
10963 point_conversion_form_t form);
10964 point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
10965
10966 unsigned char *EC_GROUP_get0_seed(const EC_GROUP *x);
10967 size_t EC_GROUP_get_seed_len(const EC_GROUP *);
10968 size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
10969 # 316 "include/openssl/ec.h"
10970 int EC_GROUP_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
10971 const BIGNUM *b, BN_CTX *ctx);
10972 # 329 "include/openssl/ec.h"
10973 int EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b,
10974 BN_CTX *ctx);
10975 # 342 "include/openssl/ec.h"
10976 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_GROUP_set_curve_GFp(EC_GROUP *group,
10977 const BIGNUM *p,
10978 const BIGNUM *a,
10979 const BIGNUM *b,
10980 BN_CTX *ctx);
10981 # 357 "include/openssl/ec.h"
10982 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_GROUP_get_curve_GFp(const EC_GROUP *group,
10983 BIGNUM *p,
10984 BIGNUM *a, BIGNUM *b,
10985 BN_CTX *ctx);
10986 # 372 "include/openssl/ec.h"
10987 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_GROUP_set_curve_GF2m(EC_GROUP *group,
10988 const BIGNUM *p,
10989 const BIGNUM *a,
10990 const BIGNUM *b,
10991 BN_CTX *ctx);
10992 # 387 "include/openssl/ec.h"
10993 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_GROUP_get_curve_GF2m(const EC_GROUP *group,
10994 BIGNUM *p,
10995 BIGNUM *a, BIGNUM *b,
10996 BN_CTX *ctx);
10997
10998
10999
11000
11001
11002
11003
11004 int EC_GROUP_get_degree(const EC_GROUP *group);
11005
11006
11007
11008
11009
11010
11011 int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
11012
11013
11014
11015
11016
11017
11018 int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx);
11019
11020
11021
11022
11023
11024
11025
11026 int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx);
11027 # 435 "include/openssl/ec.h"
11028 EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
11029 const BIGNUM *b, BN_CTX *ctx);
11030 # 446 "include/openssl/ec.h"
11031 EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,
11032 const BIGNUM *b, BN_CTX *ctx);
11033 # 460 "include/openssl/ec.h"
11034 EC_GROUP *EC_GROUP_new_from_params(const OSSL_PARAM params[],
11035 OSSL_LIB_CTX *libctx, const char *propq);
11036 # 476 "include/openssl/ec.h"
11037 OSSL_PARAM *EC_GROUP_to_params(const EC_GROUP *group, OSSL_LIB_CTX *libctx,
11038 const char *propq, BN_CTX *bnctx);
11039 # 488 "include/openssl/ec.h"
11040 EC_GROUP *EC_GROUP_new_by_curve_name_ex(OSSL_LIB_CTX *libctx, const char *propq,
11041 int nid);
11042 # 499 "include/openssl/ec.h"
11043 EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
11044
11045
11046
11047
11048
11049
11050 EC_GROUP *EC_GROUP_new_from_ecparameters(const ECPARAMETERS *params);
11051
11052
11053
11054
11055
11056
11057
11058 ECPARAMETERS *EC_GROUP_get_ecparameters(const EC_GROUP *group,
11059 ECPARAMETERS *params);
11060
11061
11062
11063
11064
11065
11066 EC_GROUP *EC_GROUP_new_from_ecpkparameters(const ECPKPARAMETERS *params);
11067
11068
11069
11070
11071
11072
11073
11074 ECPKPARAMETERS *EC_GROUP_get_ecpkparameters(const EC_GROUP *group,
11075 ECPKPARAMETERS *params);
11076
11077
11078
11079
11080
11081 typedef struct {
11082 int nid;
11083 const char *comment;
11084 } EC_builtin_curve;
11085
11086
11087
11088
11089
11090
11091
11092 size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
11093
11094 const char *EC_curve_nid2nist(int nid);
11095 int EC_curve_nist2nid(const char *name);
11096 int EC_GROUP_check_named_curve(const EC_GROUP *group, int nist_only,
11097 BN_CTX *ctx);
11098 # 563 "include/openssl/ec.h"
11099 EC_POINT *EC_POINT_new(const EC_GROUP *group);
11100
11101
11102
11103
11104 void EC_POINT_free(EC_POINT *point);
11105
11106
11107
11108
11109 void EC_POINT_clear_free(EC_POINT *point);
11110
11111
11112
11113
11114
11115
11116 int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
11117
11118
11119
11120
11121
11122
11123
11124 EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
11125
11126
11127
11128
11129
11130
11131 int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
11132
11133
11134
11135
11136
11137
11138 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
11139 # 613 "include/openssl/ec.h"
11140 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_set_Jprojective_coordinates_GFp
11141 (const EC_GROUP *group, EC_POINT *p,
11142 const BIGNUM *x, const BIGNUM *y, const BIGNUM *z,
11143 BN_CTX *ctx);
11144 # 627 "include/openssl/ec.h"
11145 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_get_Jprojective_coordinates_GFp
11146 (const EC_GROUP *group, const EC_POINT *p,
11147 BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx);
11148 # 640 "include/openssl/ec.h"
11149 int EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *p,
11150 const BIGNUM *x, const BIGNUM *y,
11151 BN_CTX *ctx);
11152 # 652 "include/openssl/ec.h"
11153 int EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *p,
11154 BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
11155 # 665 "include/openssl/ec.h"
11156 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_set_affine_coordinates_GFp
11157 (const EC_GROUP *group, EC_POINT *p,
11158 const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx);
11159 # 678 "include/openssl/ec.h"
11160 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_get_affine_coordinates_GFp
11161 (const EC_GROUP *group, const EC_POINT *p,
11162 BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
11163 # 691 "include/openssl/ec.h"
11164 int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *p,
11165 const BIGNUM *x, int y_bit,
11166 BN_CTX *ctx);
11167 # 705 "include/openssl/ec.h"
11168 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_set_compressed_coordinates_GFp
11169 (const EC_GROUP *group, EC_POINT *p,
11170 const BIGNUM *x, int y_bit, BN_CTX *ctx);
11171 # 718 "include/openssl/ec.h"
11172 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_set_affine_coordinates_GF2m
11173 (const EC_GROUP *group, EC_POINT *p,
11174 const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx);
11175 # 731 "include/openssl/ec.h"
11176 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_get_affine_coordinates_GF2m
11177 (const EC_GROUP *group, const EC_POINT *p,
11178 BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
11179 # 744 "include/openssl/ec.h"
11180 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_set_compressed_coordinates_GF2m
11181 (const EC_GROUP *group, EC_POINT *p,
11182 const BIGNUM *x, int y_bit, BN_CTX *ctx);
11183 # 760 "include/openssl/ec.h"
11184 size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
11185 point_conversion_form_t form,
11186 unsigned char *buf, size_t len, BN_CTX *ctx);
11187 # 772 "include/openssl/ec.h"
11188 int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,
11189 const unsigned char *buf, size_t len, BN_CTX *ctx);
11190 # 783 "include/openssl/ec.h"
11191 size_t EC_POINT_point2buf(const EC_GROUP *group, const EC_POINT *point,
11192 point_conversion_form_t form,
11193 unsigned char **pbuf, BN_CTX *ctx);
11194
11195
11196
11197 __attribute__((deprecated("Since OpenSSL " "3.0"))) BIGNUM *EC_POINT_point2bn(const EC_GROUP *,
11198 const EC_POINT *,
11199 point_conversion_form_t form,
11200 BIGNUM *, BN_CTX *);
11201 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_POINT *EC_POINT_bn2point(const EC_GROUP *,
11202 const BIGNUM *,
11203 EC_POINT *, BN_CTX *);
11204
11205
11206 char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
11207 point_conversion_form_t form, BN_CTX *);
11208 EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
11209 EC_POINT *, BN_CTX *);
11210 # 815 "include/openssl/ec.h"
11211 int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
11212 const EC_POINT *b, BN_CTX *ctx);
11213 # 825 "include/openssl/ec.h"
11214 int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
11215 BN_CTX *ctx);
11216
11217
11218
11219
11220
11221
11222
11223 int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);
11224
11225
11226
11227
11228
11229
11230 int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p);
11231
11232
11233
11234
11235
11236
11237
11238 int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
11239 BN_CTX *ctx);
11240 # 859 "include/openssl/ec.h"
11241 int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b,
11242 BN_CTX *ctx);
11243
11244
11245 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_make_affine(const EC_GROUP *group,
11246 EC_POINT *point, BN_CTX *ctx);
11247 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
11248 EC_POINT *points[], BN_CTX *ctx);
11249 # 878 "include/openssl/ec.h"
11250 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r,
11251 const BIGNUM *n, size_t num,
11252 const EC_POINT *p[], const BIGNUM *m[],
11253 BN_CTX *ctx);
11254 # 893 "include/openssl/ec.h"
11255 int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
11256 const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
11257
11258
11259
11260
11261
11262
11263
11264 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
11265
11266
11267
11268
11269
11270 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
11271
11272
11273
11274
11275
11276
11277 extern const ASN1_ITEM * ECPKPARAMETERS_it(void);
11278 extern ECPKPARAMETERS *ECPKPARAMETERS_new(void); extern void ECPKPARAMETERS_free(ECPKPARAMETERS *a);
11279 extern const ASN1_ITEM * ECPARAMETERS_it(void);
11280 extern ECPARAMETERS *ECPARAMETERS_new(void); extern void ECPARAMETERS_free(ECPARAMETERS *a);
11281
11282
11283
11284
11285
11286 int EC_GROUP_get_basis_type(const EC_GROUP *);
11287
11288 int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
11289 int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,
11290 unsigned int *k2, unsigned int *k3);
11291
11292
11293 EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
11294 int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
11295 # 945 "include/openssl/ec.h"
11296 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECPKParameters_print(BIO *bp, const EC_GROUP *x,
11297 int off);
11298
11299 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x,
11300 int off);
11301 # 980 "include/openssl/ec.h"
11302 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *EC_KEY_new_ex(OSSL_LIB_CTX *ctx, const char *propq);
11303
11304
11305
11306
11307
11308
11309 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *EC_KEY_new(void);
11310
11311 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_get_flags(const EC_KEY *key);
11312
11313 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_set_flags(EC_KEY *key, int flags);
11314
11315 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_clear_flags(EC_KEY *key, int flags);
11316
11317 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_decoded_from_explicit_params(const EC_KEY *key);
11318 # 1006 "include/openssl/ec.h"
11319 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *EC_KEY_new_by_curve_name_ex(OSSL_LIB_CTX *ctx,
11320 const char *propq,
11321 int nid);
11322 # 1017 "include/openssl/ec.h"
11323 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *EC_KEY_new_by_curve_name(int nid);
11324
11325
11326
11327
11328 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_free(EC_KEY *key);
11329
11330
11331
11332
11333
11334
11335 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
11336
11337
11338
11339
11340
11341 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *EC_KEY_dup(const EC_KEY *src);
11342
11343
11344
11345
11346
11347 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_up_ref(EC_KEY *key);
11348
11349
11350
11351
11352
11353 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *EC_KEY_get0_engine(const EC_KEY *eckey);
11354
11355
11356
11357
11358
11359 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
11360
11361
11362
11363
11364
11365
11366
11367 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
11368
11369
11370
11371
11372
11373 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
11374
11375
11376
11377
11378
11379
11380
11381 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
11382
11383
11384
11385
11386
11387 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
11388
11389
11390
11391
11392
11393
11394
11395 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
11396
11397 __attribute__((deprecated("Since OpenSSL " "3.0"))) unsigned EC_KEY_get_enc_flags(const EC_KEY *key);
11398 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
11399 __attribute__((deprecated("Since OpenSSL " "3.0"))) point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key);
11400 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_set_conv_form(EC_KEY *eckey,
11401 point_conversion_form_t cform);
11402
11403
11404
11405
11406
11407
11408 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_set_ex_data(EC_KEY *key, int idx, void *arg);
11409 __attribute__((deprecated("Since OpenSSL " "3.0"))) void *EC_KEY_get_ex_data(const EC_KEY *key, int idx);
11410
11411
11412 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
11413
11414
11415
11416
11417
11418
11419
11420 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
11421
11422
11423
11424
11425
11426 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_generate_key(EC_KEY *key);
11427
11428
11429
11430
11431
11432 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_check_key(const EC_KEY *key);
11433
11434
11435
11436
11437
11438 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_can_sign(const EC_KEY *eckey);
11439 # 1141 "include/openssl/ec.h"
11440 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key,
11441 BIGNUM *x,
11442 BIGNUM *y);
11443 # 1152 "include/openssl/ec.h"
11444 __attribute__((deprecated("Since OpenSSL " "3.0"))) size_t EC_KEY_key2buf(const EC_KEY *key,
11445 point_conversion_form_t form,
11446 unsigned char **pbuf, BN_CTX *ctx);
11447 # 1164 "include/openssl/ec.h"
11448 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_oct2key(EC_KEY *key, const unsigned char *buf,
11449 size_t len, BN_CTX *ctx);
11450 # 1174 "include/openssl/ec.h"
11451 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_oct2priv(EC_KEY *key, const unsigned char *buf,
11452 size_t len);
11453 # 1185 "include/openssl/ec.h"
11454 __attribute__((deprecated("Since OpenSSL " "3.0"))) size_t EC_KEY_priv2oct(const EC_KEY *key,
11455 unsigned char *buf, size_t len);
11456
11457
11458
11459
11460
11461
11462 __attribute__((deprecated("Since OpenSSL " "3.0"))) size_t EC_KEY_priv2buf(const EC_KEY *eckey,
11463 unsigned char **pbuf);
11464 # 1206 "include/openssl/ec.h"
11465 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *d2i_ECPrivateKey(EC_KEY **key,
11466 const unsigned char **in,
11467 long len);
11468
11469
11470
11471
11472
11473
11474
11475 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_ECPrivateKey(const EC_KEY *key,
11476 unsigned char **out);
11477 # 1230 "include/openssl/ec.h"
11478 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *d2i_ECParameters(EC_KEY **key,
11479 const unsigned char **in,
11480 long len);
11481
11482
11483
11484
11485
11486
11487
11488 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_ECParameters(const EC_KEY *key,
11489 unsigned char **out);
11490 # 1255 "include/openssl/ec.h"
11491 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *o2i_ECPublicKey(EC_KEY **key,
11492 const unsigned char **in, long len);
11493
11494
11495
11496
11497
11498
11499
11500 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2o_ECPublicKey(const EC_KEY *key, unsigned char **out);
11501
11502
11503
11504
11505
11506
11507 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECParameters_print(BIO *bp, const EC_KEY *key);
11508
11509
11510
11511
11512
11513
11514
11515 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
11516
11517
11518
11519
11520
11521
11522
11523 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
11524
11525
11526
11527
11528
11529
11530
11531 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
11532
11533
11534 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_KEY_METHOD *EC_KEY_OpenSSL(void);
11535 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_KEY_METHOD *EC_KEY_get_default_method(void);
11536 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_set_default_method(const EC_KEY_METHOD *meth);
11537 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_KEY_METHOD *EC_KEY_get_method(const EC_KEY *key);
11538 __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth);
11539 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *EC_KEY_new_method(ENGINE *engine);
11540
11541
11542
11543
11544
11545
11546 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
11547 const unsigned char *Z, size_t Zlen,
11548 const unsigned char *sinfo,
11549 size_t sinfolen, const EVP_MD *md);
11550
11551 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDH_compute_key(void *out, size_t outlen,
11552 const EC_POINT *pub_key,
11553 const EC_KEY *ecdh,
11554 void *(*KDF)(const void *in,
11555 size_t inlen, void *out,
11556 size_t *outlen));
11557
11558
11559 typedef struct ECDSA_SIG_st ECDSA_SIG;
11560
11561
11562
11563
11564 ECDSA_SIG *ECDSA_SIG_new(void);
11565
11566
11567
11568
11569 void ECDSA_SIG_free(ECDSA_SIG *sig);
11570 # 1342 "include/openssl/ec.h"
11571 extern ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **a, const unsigned char **in, long len); extern int i2d_ECDSA_SIG(const ECDSA_SIG *a, unsigned char **out);
11572 # 1357 "include/openssl/ec.h"
11573 void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
11574
11575
11576
11577
11578 const BIGNUM *ECDSA_SIG_get0_r(const ECDSA_SIG *sig);
11579
11580
11581
11582
11583 const BIGNUM *ECDSA_SIG_get0_s(const ECDSA_SIG *sig);
11584
11585
11586
11587
11588
11589
11590 int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
11591 # 1384 "include/openssl/ec.h"
11592 __attribute__((deprecated("Since OpenSSL " "3.0"))) ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst,
11593 int dgst_len, EC_KEY *eckey);
11594 # 1397 "include/openssl/ec.h"
11595 __attribute__((deprecated("Since OpenSSL " "3.0"))) ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst,
11596 int dgstlen, const BIGNUM *kinv,
11597 const BIGNUM *rp, EC_KEY *eckey);
11598 # 1410 "include/openssl/ec.h"
11599 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
11600 const ECDSA_SIG *sig, EC_KEY *eckey);
11601 # 1420 "include/openssl/ec.h"
11602 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx,
11603 BIGNUM **kinv, BIGNUM **rp);
11604 # 1433 "include/openssl/ec.h"
11605 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDSA_sign(int type, const unsigned char *dgst,
11606 int dgstlen, unsigned char *sig,
11607 unsigned int *siglen, EC_KEY *eckey);
11608 # 1450 "include/openssl/ec.h"
11609 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDSA_sign_ex(int type, const unsigned char *dgst,
11610 int dgstlen, unsigned char *sig,
11611 unsigned int *siglen, const BIGNUM *kinv,
11612 const BIGNUM *rp, EC_KEY *eckey);
11613 # 1466 "include/openssl/ec.h"
11614 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDSA_verify(int type, const unsigned char *dgst,
11615 int dgstlen, const unsigned char *sig,
11616 int siglen, EC_KEY *eckey);
11617
11618
11619
11620
11621
11622 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDSA_size(const EC_KEY *eckey);
11623
11624
11625
11626
11627
11628 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY_METHOD *EC_KEY_METHOD_new(const EC_KEY_METHOD *meth);
11629 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_free(EC_KEY_METHOD *meth);
11630 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_set_init
11631 (EC_KEY_METHOD *meth,
11632 int (*init)(EC_KEY *key),
11633 void (*finish)(EC_KEY *key),
11634 int (*copy)(EC_KEY *dest, const EC_KEY *src),
11635 int (*set_group)(EC_KEY *key, const EC_GROUP *grp),
11636 int (*set_private)(EC_KEY *key, const BIGNUM *priv_key),
11637 int (*set_public)(EC_KEY *key, const EC_POINT *pub_key));
11638
11639 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_set_keygen(EC_KEY_METHOD *meth,
11640 int (*keygen)(EC_KEY *key));
11641
11642 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_set_compute_key
11643 (EC_KEY_METHOD *meth,
11644 int (*ckey)(unsigned char **psec, size_t *pseclen,
11645 const EC_POINT *pub_key, const EC_KEY *ecdh));
11646
11647 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_set_sign
11648 (EC_KEY_METHOD *meth,
11649 int (*sign)(int type, const unsigned char *dgst,
11650 int dlen, unsigned char *sig,
11651 unsigned int *siglen,
11652 const BIGNUM *kinv, const BIGNUM *r,
11653 EC_KEY *eckey),
11654 int (*sign_setup)(EC_KEY *eckey, BN_CTX *ctx_in,
11655 BIGNUM **kinvp, BIGNUM **rp),
11656 ECDSA_SIG *(*sign_sig)(const unsigned char *dgst,
11657 int dgst_len,
11658 const BIGNUM *in_kinv,
11659 const BIGNUM *in_r,
11660 EC_KEY *eckey));
11661
11662 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_set_verify
11663 (EC_KEY_METHOD *meth,
11664 int (*verify)(int type, const unsigned
11665 char *dgst, int dgst_len,
11666 const unsigned char *sigbuf,
11667 int sig_len, EC_KEY *eckey),
11668 int (*verify_sig)(const unsigned char *dgst,
11669 int dgst_len, const ECDSA_SIG *sig,
11670 EC_KEY *eckey));
11671
11672 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_get_init
11673 (const EC_KEY_METHOD *meth,
11674 int (**pinit)(EC_KEY *key),
11675 void (**pfinish)(EC_KEY *key),
11676 int (**pcopy)(EC_KEY *dest, const EC_KEY *src),
11677 int (**pset_group)(EC_KEY *key, const EC_GROUP *grp),
11678 int (**pset_private)(EC_KEY *key, const BIGNUM *priv_key),
11679 int (**pset_public)(EC_KEY *key, const EC_POINT *pub_key));
11680
11681 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_get_keygen
11682 (const EC_KEY_METHOD *meth, int (**pkeygen)(EC_KEY *key));
11683
11684 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_get_compute_key
11685 (const EC_KEY_METHOD *meth,
11686 int (**pck)(unsigned char **psec,
11687 size_t *pseclen,
11688 const EC_POINT *pub_key,
11689 const EC_KEY *ecdh));
11690
11691 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_get_sign
11692 (const EC_KEY_METHOD *meth,
11693 int (**psign)(int type, const unsigned char *dgst,
11694 int dlen, unsigned char *sig,
11695 unsigned int *siglen,
11696 const BIGNUM *kinv, const BIGNUM *r,
11697 EC_KEY *eckey),
11698 int (**psign_setup)(EC_KEY *eckey, BN_CTX *ctx_in,
11699 BIGNUM **kinvp, BIGNUM **rp),
11700 ECDSA_SIG *(**psign_sig)(const unsigned char *dgst,
11701 int dgst_len,
11702 const BIGNUM *in_kinv,
11703 const BIGNUM *in_r,
11704 EC_KEY *eckey));
11705
11706 __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_get_verify
11707 (const EC_KEY_METHOD *meth,
11708 int (**pverify)(int type, const unsigned
11709 char *dgst, int dgst_len,
11710 const unsigned char *sigbuf,
11711 int sig_len, EC_KEY *eckey),
11712 int (**pverify_sig)(const unsigned char *dgst,
11713 int dgst_len,
11714 const ECDSA_SIG *sig,
11715 EC_KEY *eckey));
11716 # 34 "include/openssl/x509.h" 2
11717
11718
11719 # 1 "include/openssl/rsa.h" 1
11720 # 12 "include/openssl/rsa.h"
11721
11722 # 24 "include/openssl/rsa.h"
11723 # 1 "include/openssl/types.h" 1
11724 # 25 "include/openssl/rsa.h" 2
11725
11726
11727
11728 # 1 "include/openssl/rsaerr.h" 1
11729 # 13 "include/openssl/rsaerr.h"
11730
11731 # 29 "include/openssl/rsa.h" 2
11732 # 122 "include/openssl/rsa.h"
11733 int EVP_PKEY_CTX_set_rsa_padding(EVP_PKEY_CTX *ctx, int pad_mode);
11734 int EVP_PKEY_CTX_get_rsa_padding(EVP_PKEY_CTX *ctx, int *pad_mode);
11735
11736 int EVP_PKEY_CTX_set_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int saltlen);
11737 int EVP_PKEY_CTX_get_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int *saltlen);
11738
11739 int EVP_PKEY_CTX_set_rsa_keygen_bits(EVP_PKEY_CTX *ctx, int bits);
11740 int EVP_PKEY_CTX_set1_rsa_keygen_pubexp(EVP_PKEY_CTX *ctx, BIGNUM *pubexp);
11741 int EVP_PKEY_CTX_set_rsa_keygen_primes(EVP_PKEY_CTX *ctx, int primes);
11742 int EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(EVP_PKEY_CTX *ctx, int saltlen);
11743
11744 __attribute__((deprecated("Since OpenSSL " "3.0")))
11745 int EVP_PKEY_CTX_set_rsa_keygen_pubexp(EVP_PKEY_CTX *ctx, BIGNUM *pubexp);
11746 # 149 "include/openssl/rsa.h"
11747 int EVP_PKEY_CTX_set_rsa_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
11748 int EVP_PKEY_CTX_set_rsa_mgf1_md_name(EVP_PKEY_CTX *ctx, const char *mdname,
11749 const char *mdprops);
11750 int EVP_PKEY_CTX_get_rsa_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
11751 int EVP_PKEY_CTX_get_rsa_mgf1_md_name(EVP_PKEY_CTX *ctx, char *name,
11752 size_t namelen);
11753 int EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
11754 int EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md_name(EVP_PKEY_CTX *ctx,
11755 const char *mdname);
11756
11757 int EVP_PKEY_CTX_set_rsa_pss_keygen_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
11758 int EVP_PKEY_CTX_set_rsa_pss_keygen_md_name(EVP_PKEY_CTX *ctx,
11759 const char *mdname,
11760 const char *mdprops);
11761
11762 int EVP_PKEY_CTX_set_rsa_oaep_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
11763 int EVP_PKEY_CTX_set_rsa_oaep_md_name(EVP_PKEY_CTX *ctx, const char *mdname,
11764 const char *mdprops);
11765 int EVP_PKEY_CTX_get_rsa_oaep_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
11766 int EVP_PKEY_CTX_get_rsa_oaep_md_name(EVP_PKEY_CTX *ctx, char *name,
11767 size_t namelen);
11768 int EVP_PKEY_CTX_set0_rsa_oaep_label(EVP_PKEY_CTX *ctx, void *label, int llen);
11769 int EVP_PKEY_CTX_get0_rsa_oaep_label(EVP_PKEY_CTX *ctx, unsigned char **label);
11770 # 212 "include/openssl/rsa.h"
11771 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *RSA_new(void);
11772 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *RSA_new_method(ENGINE *engine);
11773 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_bits(const RSA *rsa);
11774 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_size(const RSA *rsa);
11775 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_security_bits(const RSA *rsa);
11776
11777 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
11778 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
11779 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_set0_crt_params(RSA *r,
11780 BIGNUM *dmp1, BIGNUM *dmq1,
11781 BIGNUM *iqmp);
11782 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_set0_multi_prime_params(RSA *r,
11783 BIGNUM *primes[],
11784 BIGNUM *exps[],
11785 BIGNUM *coeffs[],
11786 int pnum);
11787 __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_get0_key(const RSA *r,
11788 const BIGNUM **n, const BIGNUM **e,
11789 const BIGNUM **d);
11790 __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_get0_factors(const RSA *r,
11791 const BIGNUM **p, const BIGNUM **q);
11792 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_get_multi_prime_extra_count(const RSA *r);
11793 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_get0_multi_prime_factors(const RSA *r,
11794 const BIGNUM *primes[]);
11795 __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_get0_crt_params(const RSA *r,
11796 const BIGNUM **dmp1,
11797 const BIGNUM **dmq1,
11798 const BIGNUM **iqmp);
11799 __attribute__((deprecated("Since OpenSSL " "3.0")))
11800 int RSA_get0_multi_prime_crt_params(const RSA *r, const BIGNUM *exps[],
11801 const BIGNUM *coeffs[]);
11802 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_n(const RSA *d);
11803 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_e(const RSA *d);
11804 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_d(const RSA *d);
11805 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_p(const RSA *d);
11806 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_q(const RSA *d);
11807 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_dmp1(const RSA *r);
11808 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_dmq1(const RSA *r);
11809 __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_iqmp(const RSA *r);
11810 __attribute__((deprecated("Since OpenSSL " "3.0"))) const RSA_PSS_PARAMS *RSA_get0_pss_params(const RSA *r);
11811 __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_clear_flags(RSA *r, int flags);
11812 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_test_flags(const RSA *r, int flags);
11813 __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_set_flags(RSA *r, int flags);
11814 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_get_version(RSA *r);
11815 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *RSA_get0_engine(const RSA *r);
11816
11817
11818
11819
11820
11821
11822
11823 __attribute__((deprecated("Since OpenSSL " "0.9.8"))) RSA *RSA_generate_key(int bits, unsigned long e, void
11824 (*callback) (int, int, void *),
11825 void *cb_arg);
11826
11827
11828
11829
11830 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e,
11831 BN_GENCB *cb);
11832
11833 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_generate_multi_prime_key(RSA *rsa, int bits,
11834 int primes, BIGNUM *e,
11835 BN_GENCB *cb);
11836
11837 __attribute__((deprecated("Since OpenSSL " "3.0")))
11838 int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2,
11839 BIGNUM *q1, BIGNUM *q2,
11840 const BIGNUM *Xp1, const BIGNUM *Xp2,
11841 const BIGNUM *Xp, const BIGNUM *Xq1,
11842 const BIGNUM *Xq2, const BIGNUM *Xq,
11843 const BIGNUM *e, BN_GENCB *cb);
11844 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_X931_generate_key_ex(RSA *rsa, int bits,
11845 const BIGNUM *e,
11846 BN_GENCB *cb);
11847
11848 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_check_key(const RSA *);
11849 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_check_key_ex(const RSA *, BN_GENCB *cb);
11850
11851 __attribute__((deprecated("Since OpenSSL " "3.0")))
11852 int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to,
11853 RSA *rsa, int padding);
11854 __attribute__((deprecated("Since OpenSSL " "3.0")))
11855 int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to,
11856 RSA *rsa, int padding);
11857 __attribute__((deprecated("Since OpenSSL " "3.0")))
11858 int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to,
11859 RSA *rsa, int padding);
11860 __attribute__((deprecated("Since OpenSSL " "3.0")))
11861 int RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to,
11862 RSA *rsa, int padding);
11863 __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_free(RSA *r);
11864
11865 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_up_ref(RSA *r);
11866 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_flags(const RSA *r);
11867
11868 __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_set_default_method(const RSA_METHOD *meth);
11869 __attribute__((deprecated("Since OpenSSL " "3.0"))) const RSA_METHOD *RSA_get_default_method(void);
11870 __attribute__((deprecated("Since OpenSSL " "3.0"))) const RSA_METHOD *RSA_null_method(void);
11871 __attribute__((deprecated("Since OpenSSL " "3.0"))) const RSA_METHOD *RSA_get_method(const RSA *rsa);
11872 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
11873
11874
11875 __attribute__((deprecated("Since OpenSSL " "3.0"))) const RSA_METHOD *RSA_PKCS1_OpenSSL(void);
11876
11877 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSAPublicKey(RSA **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSAPublicKey(const RSA *a, unsigned char **out); __attribute__((deprecated("Since OpenSSL " "3.0"))) const ASN1_ITEM * RSAPublicKey_it(void);
11878
11879 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSAPrivateKey(RSA **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSAPrivateKey(const RSA *a, unsigned char **out); __attribute__((deprecated("Since OpenSSL " "3.0"))) const ASN1_ITEM * RSAPrivateKey_it(void);
11880
11881
11882
11883 int RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2);
11884
11885 struct rsa_pss_params_st {
11886 X509_ALGOR *hashAlgorithm;
11887 X509_ALGOR *maskGenAlgorithm;
11888 ASN1_INTEGER *saltLength;
11889 ASN1_INTEGER *trailerField;
11890
11891 X509_ALGOR *maskHash;
11892 };
11893
11894 extern RSA_PSS_PARAMS *RSA_PSS_PARAMS_new(void); extern void RSA_PSS_PARAMS_free(RSA_PSS_PARAMS *a); extern RSA_PSS_PARAMS *d2i_RSA_PSS_PARAMS(RSA_PSS_PARAMS **a, const unsigned char **in, long len); extern int i2d_RSA_PSS_PARAMS(const RSA_PSS_PARAMS *a, unsigned char **out); extern const ASN1_ITEM * RSA_PSS_PARAMS_it(void);
11895 extern RSA_PSS_PARAMS *RSA_PSS_PARAMS_dup(const RSA_PSS_PARAMS *a);
11896
11897 typedef struct rsa_oaep_params_st {
11898 X509_ALGOR *hashFunc;
11899 X509_ALGOR *maskGenFunc;
11900 X509_ALGOR *pSourceFunc;
11901
11902 X509_ALGOR *maskHash;
11903 } RSA_OAEP_PARAMS;
11904
11905 extern RSA_OAEP_PARAMS *RSA_OAEP_PARAMS_new(void); extern void RSA_OAEP_PARAMS_free(RSA_OAEP_PARAMS *a); extern RSA_OAEP_PARAMS *d2i_RSA_OAEP_PARAMS(RSA_OAEP_PARAMS **a, const unsigned char **in, long len); extern int i2d_RSA_OAEP_PARAMS(const RSA_OAEP_PARAMS *a, unsigned char **out); extern const ASN1_ITEM * RSA_OAEP_PARAMS_it(void);
11906
11907
11908
11909 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_print_fp(FILE *fp, const RSA *r, int offset);
11910
11911
11912 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_print(BIO *bp, const RSA *r, int offset);
11913
11914
11915
11916
11917
11918 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_sign(int type, const unsigned char *m,
11919 unsigned int m_length, unsigned char *sigret,
11920 unsigned int *siglen, RSA *rsa);
11921 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_verify(int type, const unsigned char *m,
11922 unsigned int m_length,
11923 const unsigned char *sigbuf,
11924 unsigned int siglen, RSA *rsa);
11925
11926
11927
11928
11929
11930 __attribute__((deprecated("Since OpenSSL " "3.0")))
11931 int RSA_sign_ASN1_OCTET_STRING(int type,
11932 const unsigned char *m, unsigned int m_length,
11933 unsigned char *sigret, unsigned int *siglen,
11934 RSA *rsa);
11935 __attribute__((deprecated("Since OpenSSL " "3.0")))
11936 int RSA_verify_ASN1_OCTET_STRING(int type,
11937 const unsigned char *m, unsigned int m_length,
11938 unsigned char *sigbuf, unsigned int siglen,
11939 RSA *rsa);
11940
11941 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
11942 __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_blinding_off(RSA *rsa);
11943 __attribute__((deprecated("Since OpenSSL " "3.0"))) BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
11944
11945 __attribute__((deprecated("Since OpenSSL " "3.0")))
11946 int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
11947 const unsigned char *f, int fl);
11948 __attribute__((deprecated("Since OpenSSL " "3.0")))
11949 int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
11950 const unsigned char *f, int fl,
11951 int rsa_len);
11952 __attribute__((deprecated("Since OpenSSL " "3.0")))
11953 int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
11954 const unsigned char *f, int fl);
11955 __attribute__((deprecated("Since OpenSSL " "3.0")))
11956 int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
11957 const unsigned char *f, int fl,
11958 int rsa_len);
11959 __attribute__((deprecated("Since OpenSSL " "3.0"))) int PKCS1_MGF1(unsigned char *mask, long len,
11960 const unsigned char *seed, long seedlen,
11961 const EVP_MD *dgst);
11962 __attribute__((deprecated("Since OpenSSL " "3.0")))
11963 int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
11964 const unsigned char *f, int fl,
11965 const unsigned char *p, int pl);
11966 __attribute__((deprecated("Since OpenSSL " "3.0")))
11967 int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
11968 const unsigned char *f, int fl, int rsa_len,
11969 const unsigned char *p, int pl);
11970 __attribute__((deprecated("Since OpenSSL " "3.0")))
11971 int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
11972 const unsigned char *from, int flen,
11973 const unsigned char *param, int plen,
11974 const EVP_MD *md, const EVP_MD *mgf1md);
11975 __attribute__((deprecated("Since OpenSSL " "3.0")))
11976 int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
11977 const unsigned char *from, int flen,
11978 int num,
11979 const unsigned char *param, int plen,
11980 const EVP_MD *md, const EVP_MD *mgf1md);
11981 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_padding_add_none(unsigned char *to, int tlen,
11982 const unsigned char *f, int fl);
11983 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_padding_check_none(unsigned char *to, int tlen,
11984 const unsigned char *f, int fl,
11985 int rsa_len);
11986 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_padding_add_X931(unsigned char *to, int tlen,
11987 const unsigned char *f, int fl);
11988 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_padding_check_X931(unsigned char *to, int tlen,
11989 const unsigned char *f, int fl,
11990 int rsa_len);
11991 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_X931_hash_id(int nid);
11992
11993 __attribute__((deprecated("Since OpenSSL " "3.0")))
11994 int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
11995 const EVP_MD *Hash, const unsigned char *EM,
11996 int sLen);
11997 __attribute__((deprecated("Since OpenSSL " "3.0")))
11998 int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
11999 const unsigned char *mHash, const EVP_MD *Hash,
12000 int sLen);
12001
12002 __attribute__((deprecated("Since OpenSSL " "3.0")))
12003 int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,
12004 const EVP_MD *Hash, const EVP_MD *mgf1Hash,
12005 const unsigned char *EM, int sLen);
12006
12007 __attribute__((deprecated("Since OpenSSL " "3.0")))
12008 int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
12009 const unsigned char *mHash,
12010 const EVP_MD *Hash, const EVP_MD *mgf1Hash,
12011 int sLen);
12012
12013
12014
12015 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_set_ex_data(RSA *r, int idx, void *arg);
12016 __attribute__((deprecated("Since OpenSSL " "3.0"))) void *RSA_get_ex_data(const RSA *r, int idx);
12017
12018 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *RSAPublicKey_dup(const RSA *a);
12019 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *RSAPrivateKey_dup(const RSA *a);
12020 # 484 "include/openssl/rsa.h"
12021 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA_METHOD *RSA_meth_new(const char *name, int flags);
12022 __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_meth_free(RSA_METHOD *meth);
12023 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth);
12024 __attribute__((deprecated("Since OpenSSL " "3.0"))) const char *RSA_meth_get0_name(const RSA_METHOD *meth);
12025 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_meth_set1_name(RSA_METHOD *meth,
12026 const char *name);
12027 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_meth_get_flags(const RSA_METHOD *meth);
12028 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_meth_set_flags(RSA_METHOD *meth, int flags);
12029 __attribute__((deprecated("Since OpenSSL " "3.0"))) void *RSA_meth_get0_app_data(const RSA_METHOD *meth);
12030 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_meth_set0_app_data(RSA_METHOD *meth,
12031 void *app_data);
12032 __attribute__((deprecated("Since OpenSSL " "3.0")))
12033 int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth)) (int flen,
12034 const unsigned char *from,
12035 unsigned char *to,
12036 RSA *rsa, int padding);
12037 __attribute__((deprecated("Since OpenSSL " "3.0")))
12038 int RSA_meth_set_pub_enc(RSA_METHOD *rsa,
12039 int (*pub_enc) (int flen, const unsigned char *from,
12040 unsigned char *to, RSA *rsa,
12041 int padding));
12042 __attribute__((deprecated("Since OpenSSL " "3.0")))
12043 int (*RSA_meth_get_pub_dec(const RSA_METHOD *meth)) (int flen,
12044 const unsigned char *from,
12045 unsigned char *to,
12046 RSA *rsa, int padding);
12047 __attribute__((deprecated("Since OpenSSL " "3.0")))
12048 int RSA_meth_set_pub_dec(RSA_METHOD *rsa,
12049 int (*pub_dec) (int flen, const unsigned char *from,
12050 unsigned char *to, RSA *rsa,
12051 int padding));
12052 __attribute__((deprecated("Since OpenSSL " "3.0")))
12053 int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth)) (int flen,
12054 const unsigned char *from,
12055 unsigned char *to,
12056 RSA *rsa, int padding);
12057 __attribute__((deprecated("Since OpenSSL " "3.0")))
12058 int RSA_meth_set_priv_enc(RSA_METHOD *rsa,
12059 int (*priv_enc) (int flen, const unsigned char *from,
12060 unsigned char *to, RSA *rsa,
12061 int padding));
12062 __attribute__((deprecated("Since OpenSSL " "3.0")))
12063 int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth)) (int flen,
12064 const unsigned char *from,
12065 unsigned char *to,
12066 RSA *rsa, int padding);
12067 __attribute__((deprecated("Since OpenSSL " "3.0")))
12068 int RSA_meth_set_priv_dec(RSA_METHOD *rsa,
12069 int (*priv_dec) (int flen, const unsigned char *from,
12070 unsigned char *to, RSA *rsa,
12071 int padding));
12072 __attribute__((deprecated("Since OpenSSL " "3.0")))
12073 int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth)) (BIGNUM *r0,
12074 const BIGNUM *i,
12075 RSA *rsa, BN_CTX *ctx);
12076 __attribute__((deprecated("Since OpenSSL " "3.0")))
12077 int RSA_meth_set_mod_exp(RSA_METHOD *rsa,
12078 int (*mod_exp) (BIGNUM *r0, const BIGNUM *i, RSA *rsa,
12079 BN_CTX *ctx));
12080 __attribute__((deprecated("Since OpenSSL " "3.0")))
12081 int (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth)) (BIGNUM *r,
12082 const BIGNUM *a,
12083 const BIGNUM *p,
12084 const BIGNUM *m,
12085 BN_CTX *ctx,
12086 BN_MONT_CTX *m_ctx);
12087 __attribute__((deprecated("Since OpenSSL " "3.0")))
12088 int RSA_meth_set_bn_mod_exp(RSA_METHOD *rsa,
12089 int (*bn_mod_exp) (BIGNUM *r,
12090 const BIGNUM *a,
12091 const BIGNUM *p,
12092 const BIGNUM *m,
12093 BN_CTX *ctx,
12094 BN_MONT_CTX *m_ctx));
12095 __attribute__((deprecated("Since OpenSSL " "3.0")))
12096 int (*RSA_meth_get_init(const RSA_METHOD *meth)) (RSA *rsa);
12097 __attribute__((deprecated("Since OpenSSL " "3.0")))
12098 int RSA_meth_set_init(RSA_METHOD *rsa, int (*init) (RSA *rsa));
12099 __attribute__((deprecated("Since OpenSSL " "3.0")))
12100 int (*RSA_meth_get_finish(const RSA_METHOD *meth)) (RSA *rsa);
12101 __attribute__((deprecated("Since OpenSSL " "3.0")))
12102 int RSA_meth_set_finish(RSA_METHOD *rsa, int (*finish) (RSA *rsa));
12103 __attribute__((deprecated("Since OpenSSL " "3.0")))
12104 int (*RSA_meth_get_sign(const RSA_METHOD *meth)) (int type,
12105 const unsigned char *m,
12106 unsigned int m_length,
12107 unsigned char *sigret,
12108 unsigned int *siglen,
12109 const RSA *rsa);
12110 __attribute__((deprecated("Since OpenSSL " "3.0")))
12111 int RSA_meth_set_sign(RSA_METHOD *rsa,
12112 int (*sign) (int type, const unsigned char *m,
12113 unsigned int m_length,
12114 unsigned char *sigret, unsigned int *siglen,
12115 const RSA *rsa));
12116 __attribute__((deprecated("Since OpenSSL " "3.0")))
12117 int (*RSA_meth_get_verify(const RSA_METHOD *meth)) (int dtype,
12118 const unsigned char *m,
12119 unsigned int m_length,
12120 const unsigned char *sigbuf,
12121 unsigned int siglen,
12122 const RSA *rsa);
12123 __attribute__((deprecated("Since OpenSSL " "3.0")))
12124 int RSA_meth_set_verify(RSA_METHOD *rsa,
12125 int (*verify) (int dtype, const unsigned char *m,
12126 unsigned int m_length,
12127 const unsigned char *sigbuf,
12128 unsigned int siglen, const RSA *rsa));
12129 __attribute__((deprecated("Since OpenSSL " "3.0")))
12130 int (*RSA_meth_get_keygen(const RSA_METHOD *meth)) (RSA *rsa, int bits,
12131 BIGNUM *e, BN_GENCB *cb);
12132 __attribute__((deprecated("Since OpenSSL " "3.0")))
12133 int RSA_meth_set_keygen(RSA_METHOD *rsa,
12134 int (*keygen) (RSA *rsa, int bits, BIGNUM *e,
12135 BN_GENCB *cb));
12136 __attribute__((deprecated("Since OpenSSL " "3.0")))
12137 int (*RSA_meth_get_multi_prime_keygen(const RSA_METHOD *meth)) (RSA *rsa,
12138 int bits,
12139 int primes,
12140 BIGNUM *e,
12141 BN_GENCB *cb);
12142 __attribute__((deprecated("Since OpenSSL " "3.0")))
12143 int RSA_meth_set_multi_prime_keygen(RSA_METHOD *meth,
12144 int (*keygen) (RSA *rsa, int bits,
12145 int primes, BIGNUM *e,
12146 BN_GENCB *cb));
12147 # 37 "include/openssl/x509.h" 2
12148
12149
12150
12151
12152 # 1 "include/openssl/sha.h" 1
12153 # 12 "include/openssl/sha.h"
12154
12155
12156
12157
12158
12159
12160
12161
12162 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
12163 # 21 "include/openssl/sha.h" 2
12164 # 42 "include/openssl/sha.h"
12165 typedef struct SHAstate_st {
12166 unsigned int h0, h1, h2, h3, h4;
12167 unsigned int Nl, Nh;
12168 unsigned int data[16];
12169 unsigned int num;
12170 } SHA_CTX;
12171
12172 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA1_Init(SHA_CTX *c);
12173 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
12174 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA1_Final(unsigned char *md, SHA_CTX *c);
12175 __attribute__((deprecated("Since OpenSSL " "3.0"))) void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
12176
12177
12178 unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
12179
12180
12181
12182
12183
12184
12185 typedef struct SHA256state_st {
12186 unsigned int h[8];
12187 unsigned int Nl, Nh;
12188 unsigned int data[16];
12189 unsigned int num, md_len;
12190 } SHA256_CTX;
12191
12192 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA224_Init(SHA256_CTX *c);
12193 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA224_Update(SHA256_CTX *c,
12194 const void *data, size_t len);
12195 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA224_Final(unsigned char *md, SHA256_CTX *c);
12196 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA256_Init(SHA256_CTX *c);
12197 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA256_Update(SHA256_CTX *c,
12198 const void *data, size_t len);
12199 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA256_Final(unsigned char *md, SHA256_CTX *c);
12200 __attribute__((deprecated("Since OpenSSL " "3.0"))) void SHA256_Transform(SHA256_CTX *c,
12201 const unsigned char *data);
12202
12203
12204 unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md);
12205 unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);
12206 # 110 "include/openssl/sha.h"
12207 typedef struct SHA512state_st {
12208 unsigned long long h[8];
12209 unsigned long long Nl, Nh;
12210 union {
12211 unsigned long long d[16];
12212 unsigned char p[(16*8)];
12213 } u;
12214 unsigned int num, md_len;
12215 } SHA512_CTX;
12216
12217 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA384_Init(SHA512_CTX *c);
12218 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA384_Update(SHA512_CTX *c,
12219 const void *data, size_t len);
12220 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA384_Final(unsigned char *md, SHA512_CTX *c);
12221 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA512_Init(SHA512_CTX *c);
12222 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA512_Update(SHA512_CTX *c,
12223 const void *data, size_t len);
12224 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA512_Final(unsigned char *md, SHA512_CTX *c);
12225 __attribute__((deprecated("Since OpenSSL " "3.0"))) void SHA512_Transform(SHA512_CTX *c,
12226 const unsigned char *data);
12227
12228
12229 unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md);
12230 unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
12231 # 42 "include/openssl/x509.h" 2
12232 # 1 "include/openssl/x509err.h" 1
12233 # 13 "include/openssl/x509err.h"
12234
12235 # 43 "include/openssl/x509.h" 2
12236 # 52 "include/openssl/x509.h"
12237 struct stack_st_X509_NAME; typedef int (*sk_X509_NAME_compfunc)(const X509_NAME * const *a, const X509_NAME *const *b); typedef void (*sk_X509_NAME_freefunc)(X509_NAME *a); typedef X509_NAME * (*sk_X509_NAME_copyfunc)(const X509_NAME *a); static __attribute__((unused)) inline X509_NAME *ossl_check_X509_NAME_type(X509_NAME *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_NAME_sk_type(const struct stack_st_X509_NAME *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_NAME_sk_type(struct stack_st_X509_NAME *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_NAME_compfunc_type(sk_X509_NAME_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_NAME_copyfunc_type(sk_X509_NAME_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_NAME_freefunc_type(sk_X509_NAME_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12238 # 78 "include/openssl/x509.h"
12239 struct stack_st_X509; typedef int (*sk_X509_compfunc)(const X509 * const *a, const X509 *const *b); typedef void (*sk_X509_freefunc)(X509 *a); typedef X509 * (*sk_X509_copyfunc)(const X509 *a); static __attribute__((unused)) inline X509 *ossl_check_X509_type(X509 *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_sk_type(const struct stack_st_X509 *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_sk_type(struct stack_st_X509 *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_compfunc_type(sk_X509_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_copyfunc_type(sk_X509_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_freefunc_type(sk_X509_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12240 # 104 "include/openssl/x509.h"
12241 struct stack_st_X509_REVOKED; typedef int (*sk_X509_REVOKED_compfunc)(const X509_REVOKED * const *a, const X509_REVOKED *const *b); typedef void (*sk_X509_REVOKED_freefunc)(X509_REVOKED *a); typedef X509_REVOKED * (*sk_X509_REVOKED_copyfunc)(const X509_REVOKED *a); static __attribute__((unused)) inline X509_REVOKED *ossl_check_X509_REVOKED_type(X509_REVOKED *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_REVOKED_sk_type(const struct stack_st_X509_REVOKED *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_REVOKED_sk_type(struct stack_st_X509_REVOKED *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_REVOKED_compfunc_type(sk_X509_REVOKED_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_REVOKED_copyfunc_type(sk_X509_REVOKED_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_REVOKED_freefunc_type(sk_X509_REVOKED_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12242 # 130 "include/openssl/x509.h"
12243 struct stack_st_X509_CRL; typedef int (*sk_X509_CRL_compfunc)(const X509_CRL * const *a, const X509_CRL *const *b); typedef void (*sk_X509_CRL_freefunc)(X509_CRL *a); typedef X509_CRL * (*sk_X509_CRL_copyfunc)(const X509_CRL *a); static __attribute__((unused)) inline X509_CRL *ossl_check_X509_CRL_type(X509_CRL *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_CRL_sk_type(const struct stack_st_X509_CRL *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_CRL_sk_type(struct stack_st_X509_CRL *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_CRL_compfunc_type(sk_X509_CRL_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_CRL_copyfunc_type(sk_X509_CRL_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_CRL_freefunc_type(sk_X509_CRL_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12244 # 179 "include/openssl/x509.h"
12245 struct X509_algor_st {
12246 ASN1_OBJECT *algorithm;
12247 ASN1_TYPE *parameter;
12248 } ;
12249
12250 typedef struct stack_st_X509_ALGOR X509_ALGORS;
12251
12252 typedef struct X509_val_st {
12253 ASN1_TIME *notBefore;
12254 ASN1_TIME *notAfter;
12255 } X509_VAL;
12256
12257 typedef struct X509_sig_st X509_SIG;
12258
12259 typedef struct X509_name_entry_st X509_NAME_ENTRY;
12260
12261 struct stack_st_X509_NAME_ENTRY; typedef int (*sk_X509_NAME_ENTRY_compfunc)(const X509_NAME_ENTRY * const *a, const X509_NAME_ENTRY *const *b); typedef void (*sk_X509_NAME_ENTRY_freefunc)(X509_NAME_ENTRY *a); typedef X509_NAME_ENTRY * (*sk_X509_NAME_ENTRY_copyfunc)(const X509_NAME_ENTRY *a); static __attribute__((unused)) inline X509_NAME_ENTRY *ossl_check_X509_NAME_ENTRY_type(X509_NAME_ENTRY *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_NAME_ENTRY_sk_type(const struct stack_st_X509_NAME_ENTRY *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_NAME_ENTRY_sk_type(struct stack_st_X509_NAME_ENTRY *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_NAME_ENTRY_compfunc_type(sk_X509_NAME_ENTRY_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_NAME_ENTRY_copyfunc_type(sk_X509_NAME_ENTRY_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_NAME_ENTRY_freefunc_type(sk_X509_NAME_ENTRY_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12262 # 225 "include/openssl/x509.h"
12263 typedef struct X509_extension_st X509_EXTENSION;
12264 struct stack_st_X509_EXTENSION; typedef int (*sk_X509_EXTENSION_compfunc)(const X509_EXTENSION * const *a, const X509_EXTENSION *const *b); typedef void (*sk_X509_EXTENSION_freefunc)(X509_EXTENSION *a); typedef X509_EXTENSION * (*sk_X509_EXTENSION_copyfunc)(const X509_EXTENSION *a); static __attribute__((unused)) inline X509_EXTENSION *ossl_check_X509_EXTENSION_type(X509_EXTENSION *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_EXTENSION_sk_type(const struct stack_st_X509_EXTENSION *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_EXTENSION_sk_type(struct stack_st_X509_EXTENSION *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_EXTENSION_compfunc_type(sk_X509_EXTENSION_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_EXTENSION_copyfunc_type(sk_X509_EXTENSION_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_EXTENSION_freefunc_type(sk_X509_EXTENSION_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12265 # 253 "include/openssl/x509.h"
12266 typedef struct stack_st_X509_EXTENSION X509_EXTENSIONS;
12267 typedef struct x509_attributes_st X509_ATTRIBUTE;
12268 struct stack_st_X509_ATTRIBUTE; typedef int (*sk_X509_ATTRIBUTE_compfunc)(const X509_ATTRIBUTE * const *a, const X509_ATTRIBUTE *const *b); typedef void (*sk_X509_ATTRIBUTE_freefunc)(X509_ATTRIBUTE *a); typedef X509_ATTRIBUTE * (*sk_X509_ATTRIBUTE_copyfunc)(const X509_ATTRIBUTE *a); static __attribute__((unused)) inline X509_ATTRIBUTE *ossl_check_X509_ATTRIBUTE_type(X509_ATTRIBUTE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_ATTRIBUTE_sk_type(const struct stack_st_X509_ATTRIBUTE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_ATTRIBUTE_sk_type(struct stack_st_X509_ATTRIBUTE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_ATTRIBUTE_compfunc_type(sk_X509_ATTRIBUTE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_ATTRIBUTE_copyfunc_type(sk_X509_ATTRIBUTE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_ATTRIBUTE_freefunc_type(sk_X509_ATTRIBUTE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12269 # 282 "include/openssl/x509.h"
12270 typedef struct X509_req_info_st X509_REQ_INFO;
12271 typedef struct X509_req_st X509_REQ;
12272 typedef struct x509_cert_aux_st X509_CERT_AUX;
12273 typedef struct x509_cinf_st X509_CINF;
12274 # 365 "include/openssl/x509.h"
12275 typedef struct X509_crl_info_st X509_CRL_INFO;
12276
12277 typedef struct private_key_st {
12278 int version;
12279
12280 X509_ALGOR *enc_algor;
12281 ASN1_OCTET_STRING *enc_pkey;
12282
12283 EVP_PKEY *dec_pkey;
12284
12285 int key_length;
12286 char *key_data;
12287 int key_free;
12288
12289 EVP_CIPHER_INFO cipher;
12290 } X509_PKEY;
12291
12292 typedef struct X509_info_st {
12293 X509 *x509;
12294 X509_CRL *crl;
12295 X509_PKEY *x_pkey;
12296 EVP_CIPHER_INFO enc_cipher;
12297 int enc_len;
12298 char *enc_data;
12299 } X509_INFO;
12300 struct stack_st_X509_INFO; typedef int (*sk_X509_INFO_compfunc)(const X509_INFO * const *a, const X509_INFO *const *b); typedef void (*sk_X509_INFO_freefunc)(X509_INFO *a); typedef X509_INFO * (*sk_X509_INFO_copyfunc)(const X509_INFO *a); static __attribute__((unused)) inline X509_INFO *ossl_check_X509_INFO_type(X509_INFO *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_INFO_sk_type(const struct stack_st_X509_INFO *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_INFO_sk_type(struct stack_st_X509_INFO *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_INFO_compfunc_type(sk_X509_INFO_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_INFO_copyfunc_type(sk_X509_INFO_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_INFO_freefunc_type(sk_X509_INFO_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12301 # 422 "include/openssl/x509.h"
12302 typedef struct Netscape_spkac_st {
12303 X509_PUBKEY *pubkey;
12304 ASN1_IA5STRING *challenge;
12305 } NETSCAPE_SPKAC;
12306
12307 typedef struct Netscape_spki_st {
12308 NETSCAPE_SPKAC *spkac;
12309 X509_ALGOR sig_algor;
12310 ASN1_BIT_STRING *signature;
12311 } NETSCAPE_SPKI;
12312
12313
12314 typedef struct Netscape_certificate_sequence {
12315 ASN1_OBJECT *type;
12316 struct stack_st_X509 *certs;
12317 } NETSCAPE_CERT_SEQUENCE;
12318 # 448 "include/openssl/x509.h"
12319 typedef struct PBEPARAM_st {
12320 ASN1_OCTET_STRING *salt;
12321 ASN1_INTEGER *iter;
12322 } PBEPARAM;
12323
12324
12325
12326 typedef struct PBE2PARAM_st {
12327 X509_ALGOR *keyfunc;
12328 X509_ALGOR *encryption;
12329 } PBE2PARAM;
12330
12331 typedef struct PBKDF2PARAM_st {
12332
12333 ASN1_TYPE *salt;
12334 ASN1_INTEGER *iter;
12335 ASN1_INTEGER *keylength;
12336 X509_ALGOR *prf;
12337 } PBKDF2PARAM;
12338
12339
12340 typedef struct SCRYPT_PARAMS_st {
12341 ASN1_OCTET_STRING *salt;
12342 ASN1_INTEGER *costParameter;
12343 ASN1_INTEGER *blockSize;
12344 ASN1_INTEGER *parallelizationParameter;
12345 ASN1_INTEGER *keyLength;
12346 } SCRYPT_PARAMS;
12347
12348
12349
12350
12351
12352
12353 # 1 "include/openssl/x509_vfy.h" 1
12354 # 17 "include/openssl/x509_vfy.h"
12355
12356 # 58 "include/openssl/x509_vfy.h"
12357 typedef enum {
12358 X509_LU_NONE = 0,
12359 X509_LU_X509, X509_LU_CRL
12360 } X509_LOOKUP_TYPE;
12361
12362
12363
12364
12365
12366
12367 struct stack_st_X509_LOOKUP; typedef int (*sk_X509_LOOKUP_compfunc)(const X509_LOOKUP * const *a, const X509_LOOKUP *const *b); typedef void (*sk_X509_LOOKUP_freefunc)(X509_LOOKUP *a); typedef X509_LOOKUP * (*sk_X509_LOOKUP_copyfunc)(const X509_LOOKUP *a); static __attribute__((unused)) inline X509_LOOKUP *ossl_check_X509_LOOKUP_type(X509_LOOKUP *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_LOOKUP_sk_type(const struct stack_st_X509_LOOKUP *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_LOOKUP_sk_type(struct stack_st_X509_LOOKUP *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_LOOKUP_compfunc_type(sk_X509_LOOKUP_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_LOOKUP_copyfunc_type(sk_X509_LOOKUP_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_LOOKUP_freefunc_type(sk_X509_LOOKUP_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12368 # 94 "include/openssl/x509_vfy.h"
12369 struct stack_st_X509_OBJECT; typedef int (*sk_X509_OBJECT_compfunc)(const X509_OBJECT * const *a, const X509_OBJECT *const *b); typedef void (*sk_X509_OBJECT_freefunc)(X509_OBJECT *a); typedef X509_OBJECT * (*sk_X509_OBJECT_copyfunc)(const X509_OBJECT *a); static __attribute__((unused)) inline X509_OBJECT *ossl_check_X509_OBJECT_type(X509_OBJECT *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_OBJECT_sk_type(const struct stack_st_X509_OBJECT *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_OBJECT_sk_type(struct stack_st_X509_OBJECT *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_OBJECT_compfunc_type(sk_X509_OBJECT_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_OBJECT_copyfunc_type(sk_X509_OBJECT_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_OBJECT_freefunc_type(sk_X509_OBJECT_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12370 # 120 "include/openssl/x509_vfy.h"
12371 struct stack_st_X509_VERIFY_PARAM; typedef int (*sk_X509_VERIFY_PARAM_compfunc)(const X509_VERIFY_PARAM * const *a, const X509_VERIFY_PARAM *const *b); typedef void (*sk_X509_VERIFY_PARAM_freefunc)(X509_VERIFY_PARAM *a); typedef X509_VERIFY_PARAM * (*sk_X509_VERIFY_PARAM_copyfunc)(const X509_VERIFY_PARAM *a); static __attribute__((unused)) inline X509_VERIFY_PARAM *ossl_check_X509_VERIFY_PARAM_type(X509_VERIFY_PARAM *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_VERIFY_PARAM_sk_type(const struct stack_st_X509_VERIFY_PARAM *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_VERIFY_PARAM_sk_type(struct stack_st_X509_VERIFY_PARAM *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_VERIFY_PARAM_compfunc_type(sk_X509_VERIFY_PARAM_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_VERIFY_PARAM_copyfunc_type(sk_X509_VERIFY_PARAM_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_VERIFY_PARAM_freefunc_type(sk_X509_VERIFY_PARAM_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12372 # 149 "include/openssl/x509_vfy.h"
12373 typedef struct x509_trust_st {
12374 int trust;
12375 int flags;
12376 int (*check_trust) (struct x509_trust_st *, X509 *, int);
12377 char *name;
12378 int arg1;
12379 void *arg2;
12380 } X509_TRUST;
12381 struct stack_st_X509_TRUST; typedef int (*sk_X509_TRUST_compfunc)(const X509_TRUST * const *a, const X509_TRUST *const *b); typedef void (*sk_X509_TRUST_freefunc)(X509_TRUST *a); typedef X509_TRUST * (*sk_X509_TRUST_copyfunc)(const X509_TRUST *a); static __attribute__((unused)) inline X509_TRUST *ossl_check_X509_TRUST_type(X509_TRUST *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_TRUST_sk_type(const struct stack_st_X509_TRUST *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_TRUST_sk_type(struct stack_st_X509_TRUST *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_TRUST_compfunc_type(sk_X509_TRUST_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_TRUST_copyfunc_type(sk_X509_TRUST_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_TRUST_freefunc_type(sk_X509_TRUST_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12382 # 214 "include/openssl/x509_vfy.h"
12383 int X509_TRUST_set(int *t, int trust);
12384 int X509_TRUST_get_count(void);
12385 X509_TRUST *X509_TRUST_get0(int idx);
12386 int X509_TRUST_get_by_id(int id);
12387 int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int),
12388 const char *name, int arg1, void *arg2);
12389 void X509_TRUST_cleanup(void);
12390 int X509_TRUST_get_flags(const X509_TRUST *xp);
12391 char *X509_TRUST_get0_name(const X509_TRUST *xp);
12392 int X509_TRUST_get_trust(const X509_TRUST *xp);
12393
12394 int X509_trusted(const X509 *x);
12395 int X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj);
12396 int X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj);
12397 void X509_trust_clear(X509 *x);
12398 void X509_reject_clear(X509 *x);
12399 struct stack_st_ASN1_OBJECT *X509_get0_trust_objects(X509 *x);
12400 struct stack_st_ASN1_OBJECT *X509_get0_reject_objects(X509 *x);
12401
12402 int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,
12403 int);
12404 int X509_check_trust(X509 *x, int id, int flags);
12405
12406 int X509_verify_cert(X509_STORE_CTX *ctx);
12407 int X509_STORE_CTX_verify(X509_STORE_CTX *ctx);
12408 struct stack_st_X509 *X509_build_chain(X509 *target, struct stack_st_X509 *certs,
12409 X509_STORE *store, int with_self_signed,
12410 OSSL_LIB_CTX *libctx, const char *propq);
12411
12412 int X509_STORE_set_depth(X509_STORE *store, int depth);
12413
12414 typedef int (*X509_STORE_CTX_verify_cb)(int, X509_STORE_CTX *);
12415 int X509_STORE_CTX_print_verify_cb(int ok, X509_STORE_CTX *ctx);
12416 typedef int (*X509_STORE_CTX_verify_fn)(X509_STORE_CTX *);
12417 typedef int (*X509_STORE_CTX_get_issuer_fn)(X509 **issuer,
12418 X509_STORE_CTX *ctx, X509 *x);
12419 typedef int (*X509_STORE_CTX_check_issued_fn)(X509_STORE_CTX *ctx,
12420 X509 *x, X509 *issuer);
12421 typedef int (*X509_STORE_CTX_check_revocation_fn)(X509_STORE_CTX *ctx);
12422 typedef int (*X509_STORE_CTX_get_crl_fn)(X509_STORE_CTX *ctx,
12423 X509_CRL **crl, X509 *x);
12424 typedef int (*X509_STORE_CTX_check_crl_fn)(X509_STORE_CTX *ctx, X509_CRL *crl);
12425 typedef int (*X509_STORE_CTX_cert_crl_fn)(X509_STORE_CTX *ctx,
12426 X509_CRL *crl, X509 *x);
12427 typedef int (*X509_STORE_CTX_check_policy_fn)(X509_STORE_CTX *ctx);
12428 typedef struct stack_st_X509
12429 *(*X509_STORE_CTX_lookup_certs_fn)(X509_STORE_CTX *ctx,
12430 const X509_NAME *nm);
12431 typedef struct stack_st_X509_CRL
12432 *(*X509_STORE_CTX_lookup_crls_fn)(const X509_STORE_CTX *ctx,
12433 const X509_NAME *nm);
12434 typedef int (*X509_STORE_CTX_cleanup_fn)(X509_STORE_CTX *ctx);
12435
12436 void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
12437 # 479 "include/openssl/x509_vfy.h"
12438 int X509_OBJECT_idx_by_subject(struct stack_st_X509_OBJECT *h, X509_LOOKUP_TYPE type,
12439 const X509_NAME *name);
12440 X509_OBJECT *X509_OBJECT_retrieve_by_subject(struct stack_st_X509_OBJECT *h,
12441 X509_LOOKUP_TYPE type,
12442 const X509_NAME *name);
12443 X509_OBJECT *X509_OBJECT_retrieve_match(struct stack_st_X509_OBJECT *h,
12444 X509_OBJECT *x);
12445 int X509_OBJECT_up_ref_count(X509_OBJECT *a);
12446 X509_OBJECT *X509_OBJECT_new(void);
12447 void X509_OBJECT_free(X509_OBJECT *a);
12448 X509_LOOKUP_TYPE X509_OBJECT_get_type(const X509_OBJECT *a);
12449 X509 *X509_OBJECT_get0_X509(const X509_OBJECT *a);
12450 int X509_OBJECT_set1_X509(X509_OBJECT *a, X509 *obj);
12451 X509_CRL *X509_OBJECT_get0_X509_CRL(const X509_OBJECT *a);
12452 int X509_OBJECT_set1_X509_CRL(X509_OBJECT *a, X509_CRL *obj);
12453 X509_STORE *X509_STORE_new(void);
12454 void X509_STORE_free(X509_STORE *xs);
12455 int X509_STORE_lock(X509_STORE *xs);
12456 int X509_STORE_unlock(X509_STORE *xs);
12457 int X509_STORE_up_ref(X509_STORE *xs);
12458 struct stack_st_X509_OBJECT *X509_STORE_get0_objects(const X509_STORE *xs);
12459 struct stack_st_X509_OBJECT *X509_STORE_get1_objects(X509_STORE *xs);
12460 struct stack_st_X509 *X509_STORE_get1_all_certs(X509_STORE *xs);
12461 struct stack_st_X509 *X509_STORE_CTX_get1_certs(X509_STORE_CTX *xs,
12462 const X509_NAME *nm);
12463 struct stack_st_X509_CRL *X509_STORE_CTX_get1_crls(const X509_STORE_CTX *st,
12464 const X509_NAME *nm);
12465 int X509_STORE_set_flags(X509_STORE *xs, unsigned long flags);
12466 int X509_STORE_set_purpose(X509_STORE *xs, int purpose);
12467 int X509_STORE_set_trust(X509_STORE *xs, int trust);
12468 int X509_STORE_set1_param(X509_STORE *xs, const X509_VERIFY_PARAM *pm);
12469 X509_VERIFY_PARAM *X509_STORE_get0_param(const X509_STORE *xs);
12470
12471 void X509_STORE_set_verify(X509_STORE *xs, X509_STORE_CTX_verify_fn verify);
12472
12473
12474 void X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx,
12475 X509_STORE_CTX_verify_fn verify);
12476 X509_STORE_CTX_verify_fn X509_STORE_get_verify(const X509_STORE *xs);
12477 void X509_STORE_set_verify_cb(X509_STORE *xs,
12478 X509_STORE_CTX_verify_cb verify_cb);
12479
12480
12481 X509_STORE_CTX_verify_cb X509_STORE_get_verify_cb(const X509_STORE *xs);
12482 void X509_STORE_set_get_issuer(X509_STORE *xs,
12483 X509_STORE_CTX_get_issuer_fn get_issuer);
12484 X509_STORE_CTX_get_issuer_fn X509_STORE_get_get_issuer(const X509_STORE *xs);
12485 void X509_STORE_set_check_issued(X509_STORE *xs,
12486 X509_STORE_CTX_check_issued_fn check_issued);
12487 X509_STORE_CTX_check_issued_fn X509_STORE_get_check_issued(const X509_STORE *s);
12488 void X509_STORE_set_check_revocation(X509_STORE *xs,
12489 X509_STORE_CTX_check_revocation_fn check_revocation);
12490 X509_STORE_CTX_check_revocation_fn
12491 X509_STORE_get_check_revocation(const X509_STORE *xs);
12492 void X509_STORE_set_get_crl(X509_STORE *xs,
12493 X509_STORE_CTX_get_crl_fn get_crl);
12494 X509_STORE_CTX_get_crl_fn X509_STORE_get_get_crl(const X509_STORE *xs);
12495 void X509_STORE_set_check_crl(X509_STORE *xs,
12496 X509_STORE_CTX_check_crl_fn check_crl);
12497 X509_STORE_CTX_check_crl_fn X509_STORE_get_check_crl(const X509_STORE *xs);
12498 void X509_STORE_set_cert_crl(X509_STORE *xs,
12499 X509_STORE_CTX_cert_crl_fn cert_crl);
12500 X509_STORE_CTX_cert_crl_fn X509_STORE_get_cert_crl(const X509_STORE *xs);
12501 void X509_STORE_set_check_policy(X509_STORE *xs,
12502 X509_STORE_CTX_check_policy_fn check_policy);
12503 X509_STORE_CTX_check_policy_fn X509_STORE_get_check_policy(const X509_STORE *s);
12504 void X509_STORE_set_lookup_certs(X509_STORE *xs,
12505 X509_STORE_CTX_lookup_certs_fn lookup_certs);
12506 X509_STORE_CTX_lookup_certs_fn X509_STORE_get_lookup_certs(const X509_STORE *s);
12507 void X509_STORE_set_lookup_crls(X509_STORE *xs,
12508 X509_STORE_CTX_lookup_crls_fn lookup_crls);
12509
12510
12511 X509_STORE_CTX_lookup_crls_fn X509_STORE_get_lookup_crls(const X509_STORE *xs);
12512 void X509_STORE_set_cleanup(X509_STORE *xs,
12513 X509_STORE_CTX_cleanup_fn cleanup);
12514 X509_STORE_CTX_cleanup_fn X509_STORE_get_cleanup(const X509_STORE *xs);
12515
12516
12517
12518 int X509_STORE_set_ex_data(X509_STORE *xs, int idx, void *data);
12519 void *X509_STORE_get_ex_data(const X509_STORE *xs, int idx);
12520
12521 X509_STORE_CTX *X509_STORE_CTX_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
12522 X509_STORE_CTX *X509_STORE_CTX_new(void);
12523
12524 int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
12525
12526 void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
12527 int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *trust_store,
12528 X509 *target, struct stack_st_X509 *untrusted);
12529 int X509_STORE_CTX_init_rpk(X509_STORE_CTX *ctx, X509_STORE *trust_store,
12530 EVP_PKEY* rpk);
12531 void X509_STORE_CTX_set0_trusted_stack(X509_STORE_CTX *ctx, struct stack_st_X509 *sk);
12532 void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
12533
12534 X509_STORE *X509_STORE_CTX_get0_store(const X509_STORE_CTX *ctx);
12535 X509 *X509_STORE_CTX_get0_cert(const X509_STORE_CTX *ctx);
12536 EVP_PKEY *X509_STORE_CTX_get0_rpk(const X509_STORE_CTX *ctx);
12537 struct stack_st_X509* X509_STORE_CTX_get0_untrusted(const X509_STORE_CTX *ctx);
12538 void X509_STORE_CTX_set0_untrusted(X509_STORE_CTX *ctx, struct stack_st_X509 *sk);
12539 void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
12540 X509_STORE_CTX_verify_cb verify);
12541 X509_STORE_CTX_verify_cb X509_STORE_CTX_get_verify_cb(const X509_STORE_CTX *ctx);
12542 X509_STORE_CTX_verify_fn X509_STORE_CTX_get_verify(const X509_STORE_CTX *ctx);
12543 X509_STORE_CTX_get_issuer_fn X509_STORE_CTX_get_get_issuer(const X509_STORE_CTX *ctx);
12544 X509_STORE_CTX_check_issued_fn X509_STORE_CTX_get_check_issued(const X509_STORE_CTX *ctx);
12545 X509_STORE_CTX_check_revocation_fn X509_STORE_CTX_get_check_revocation(const X509_STORE_CTX *ctx);
12546 void X509_STORE_CTX_set_get_crl(X509_STORE_CTX *ctx,
12547 X509_STORE_CTX_get_crl_fn get_crl);
12548 X509_STORE_CTX_get_crl_fn X509_STORE_CTX_get_get_crl(const X509_STORE_CTX *ctx);
12549 X509_STORE_CTX_check_crl_fn X509_STORE_CTX_get_check_crl(const X509_STORE_CTX *ctx);
12550 X509_STORE_CTX_cert_crl_fn X509_STORE_CTX_get_cert_crl(const X509_STORE_CTX *ctx);
12551 X509_STORE_CTX_check_policy_fn X509_STORE_CTX_get_check_policy(const X509_STORE_CTX *ctx);
12552 X509_STORE_CTX_lookup_certs_fn X509_STORE_CTX_get_lookup_certs(const X509_STORE_CTX *ctx);
12553 X509_STORE_CTX_lookup_crls_fn X509_STORE_CTX_get_lookup_crls(const X509_STORE_CTX *ctx);
12554 X509_STORE_CTX_cleanup_fn X509_STORE_CTX_get_cleanup(const X509_STORE_CTX *ctx);
12555 # 610 "include/openssl/x509_vfy.h"
12556 X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *xs, X509_LOOKUP_METHOD *m);
12557 X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void);
12558 X509_LOOKUP_METHOD *X509_LOOKUP_file(void);
12559 X509_LOOKUP_METHOD *X509_LOOKUP_store(void);
12560
12561 typedef int (*X509_LOOKUP_ctrl_fn)(X509_LOOKUP *ctx, int cmd, const char *argc,
12562 long argl, char **ret);
12563 typedef int (*X509_LOOKUP_ctrl_ex_fn)(
12564 X509_LOOKUP *ctx, int cmd, const char *argc, long argl, char **ret,
12565 OSSL_LIB_CTX *libctx, const char *propq);
12566
12567 typedef int (*X509_LOOKUP_get_by_subject_fn)(X509_LOOKUP *ctx,
12568 X509_LOOKUP_TYPE type,
12569 const X509_NAME *name,
12570 X509_OBJECT *ret);
12571 typedef int (*X509_LOOKUP_get_by_subject_ex_fn)(X509_LOOKUP *ctx,
12572 X509_LOOKUP_TYPE type,
12573 const X509_NAME *name,
12574 X509_OBJECT *ret,
12575 OSSL_LIB_CTX *libctx,
12576 const char *propq);
12577 typedef int (*X509_LOOKUP_get_by_issuer_serial_fn)(X509_LOOKUP *ctx,
12578 X509_LOOKUP_TYPE type,
12579 const X509_NAME *name,
12580 const ASN1_INTEGER *serial,
12581 X509_OBJECT *ret);
12582 typedef int (*X509_LOOKUP_get_by_fingerprint_fn)(X509_LOOKUP *ctx,
12583 X509_LOOKUP_TYPE type,
12584 const unsigned char* bytes,
12585 int len,
12586 X509_OBJECT *ret);
12587 typedef int (*X509_LOOKUP_get_by_alias_fn)(X509_LOOKUP *ctx,
12588 X509_LOOKUP_TYPE type,
12589 const char *str,
12590 int len,
12591 X509_OBJECT *ret);
12592
12593 X509_LOOKUP_METHOD *X509_LOOKUP_meth_new(const char *name);
12594 void X509_LOOKUP_meth_free(X509_LOOKUP_METHOD *method);
12595
12596 int X509_LOOKUP_meth_set_new_item(X509_LOOKUP_METHOD *method,
12597 int (*new_item) (X509_LOOKUP *ctx));
12598 int (*X509_LOOKUP_meth_get_new_item(const X509_LOOKUP_METHOD* method))
12599 (X509_LOOKUP *ctx);
12600
12601 int X509_LOOKUP_meth_set_free(X509_LOOKUP_METHOD *method,
12602 void (*free_fn) (X509_LOOKUP *ctx));
12603 void (*X509_LOOKUP_meth_get_free(const X509_LOOKUP_METHOD* method))
12604 (X509_LOOKUP *ctx);
12605
12606 int X509_LOOKUP_meth_set_init(X509_LOOKUP_METHOD *method,
12607 int (*init) (X509_LOOKUP *ctx));
12608 int (*X509_LOOKUP_meth_get_init(const X509_LOOKUP_METHOD* method))
12609 (X509_LOOKUP *ctx);
12610
12611 int X509_LOOKUP_meth_set_shutdown(X509_LOOKUP_METHOD *method,
12612 int (*shutdown) (X509_LOOKUP *ctx));
12613 int (*X509_LOOKUP_meth_get_shutdown(const X509_LOOKUP_METHOD* method))
12614 (X509_LOOKUP *ctx);
12615
12616 int X509_LOOKUP_meth_set_ctrl(X509_LOOKUP_METHOD *method,
12617 X509_LOOKUP_ctrl_fn ctrl_fn);
12618 X509_LOOKUP_ctrl_fn X509_LOOKUP_meth_get_ctrl(const X509_LOOKUP_METHOD *method);
12619
12620 int X509_LOOKUP_meth_set_get_by_subject(X509_LOOKUP_METHOD *method,
12621 X509_LOOKUP_get_by_subject_fn fn);
12622 X509_LOOKUP_get_by_subject_fn X509_LOOKUP_meth_get_get_by_subject(
12623 const X509_LOOKUP_METHOD *method);
12624
12625 int X509_LOOKUP_meth_set_get_by_issuer_serial(X509_LOOKUP_METHOD *method,
12626 X509_LOOKUP_get_by_issuer_serial_fn fn);
12627 X509_LOOKUP_get_by_issuer_serial_fn X509_LOOKUP_meth_get_get_by_issuer_serial(
12628 const X509_LOOKUP_METHOD *method);
12629
12630 int X509_LOOKUP_meth_set_get_by_fingerprint(X509_LOOKUP_METHOD *method,
12631 X509_LOOKUP_get_by_fingerprint_fn fn);
12632 X509_LOOKUP_get_by_fingerprint_fn X509_LOOKUP_meth_get_get_by_fingerprint(
12633 const X509_LOOKUP_METHOD *method);
12634
12635 int X509_LOOKUP_meth_set_get_by_alias(X509_LOOKUP_METHOD *method,
12636 X509_LOOKUP_get_by_alias_fn fn);
12637 X509_LOOKUP_get_by_alias_fn X509_LOOKUP_meth_get_get_by_alias(
12638 const X509_LOOKUP_METHOD *method);
12639
12640
12641 int X509_STORE_add_cert(X509_STORE *xs, X509 *x);
12642 int X509_STORE_add_crl(X509_STORE *xs, X509_CRL *x);
12643
12644 int X509_STORE_CTX_get_by_subject(const X509_STORE_CTX *vs,
12645 X509_LOOKUP_TYPE type,
12646 const X509_NAME *name, X509_OBJECT *ret);
12647 X509_OBJECT *X509_STORE_CTX_get_obj_by_subject(X509_STORE_CTX *vs,
12648 X509_LOOKUP_TYPE type,
12649 const X509_NAME *name);
12650
12651 int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
12652 long argl, char **ret);
12653 int X509_LOOKUP_ctrl_ex(X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
12654 char **ret, OSSL_LIB_CTX *libctx, const char *propq);
12655
12656 int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
12657 int X509_load_cert_file_ex(X509_LOOKUP *ctx, const char *file, int type,
12658 OSSL_LIB_CTX *libctx, const char *propq);
12659 int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);
12660 int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);
12661 int X509_load_cert_crl_file_ex(X509_LOOKUP *ctx, const char *file, int type,
12662 OSSL_LIB_CTX *libctx, const char *propq);
12663
12664 X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
12665 void X509_LOOKUP_free(X509_LOOKUP *ctx);
12666 int X509_LOOKUP_init(X509_LOOKUP *ctx);
12667 int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
12668 const X509_NAME *name, X509_OBJECT *ret);
12669 int X509_LOOKUP_by_subject_ex(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
12670 const X509_NAME *name, X509_OBJECT *ret,
12671 OSSL_LIB_CTX *libctx, const char *propq);
12672 int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
12673 const X509_NAME *name,
12674 const ASN1_INTEGER *serial,
12675 X509_OBJECT *ret);
12676 int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
12677 const unsigned char *bytes, int len,
12678 X509_OBJECT *ret);
12679 int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
12680 const char *str, int len, X509_OBJECT *ret);
12681 int X509_LOOKUP_set_method_data(X509_LOOKUP *ctx, void *data);
12682 void *X509_LOOKUP_get_method_data(const X509_LOOKUP *ctx);
12683 X509_STORE *X509_LOOKUP_get_store(const X509_LOOKUP *ctx);
12684 int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
12685
12686 int X509_STORE_load_file(X509_STORE *xs, const char *file);
12687 int X509_STORE_load_path(X509_STORE *xs, const char *path);
12688 int X509_STORE_load_store(X509_STORE *xs, const char *store);
12689 int X509_STORE_load_locations(X509_STORE *s, const char *file, const char *dir);
12690 int X509_STORE_set_default_paths(X509_STORE *xs);
12691
12692 int X509_STORE_load_file_ex(X509_STORE *xs, const char *file,
12693 OSSL_LIB_CTX *libctx, const char *propq);
12694 int X509_STORE_load_store_ex(X509_STORE *xs, const char *store,
12695 OSSL_LIB_CTX *libctx, const char *propq);
12696 int X509_STORE_load_locations_ex(X509_STORE *xs,
12697 const char *file, const char *dir,
12698 OSSL_LIB_CTX *libctx, const char *propq);
12699 int X509_STORE_set_default_paths_ex(X509_STORE *xs,
12700 OSSL_LIB_CTX *libctx, const char *propq);
12701
12702
12703
12704 int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data);
12705 void *X509_STORE_CTX_get_ex_data(const X509_STORE_CTX *ctx, int idx);
12706 int X509_STORE_CTX_get_error(const X509_STORE_CTX *ctx);
12707 void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s);
12708 int X509_STORE_CTX_get_error_depth(const X509_STORE_CTX *ctx);
12709 void X509_STORE_CTX_set_error_depth(X509_STORE_CTX *ctx, int depth);
12710 X509 *X509_STORE_CTX_get_current_cert(const X509_STORE_CTX *ctx);
12711 void X509_STORE_CTX_set_current_cert(X509_STORE_CTX *ctx, X509 *x);
12712 X509 *X509_STORE_CTX_get0_current_issuer(const X509_STORE_CTX *ctx);
12713 X509_CRL *X509_STORE_CTX_get0_current_crl(const X509_STORE_CTX *ctx);
12714 X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(const X509_STORE_CTX *ctx);
12715 struct stack_st_X509 *X509_STORE_CTX_get0_chain(const X509_STORE_CTX *ctx);
12716 struct stack_st_X509 *X509_STORE_CTX_get1_chain(const X509_STORE_CTX *ctx);
12717 void X509_STORE_CTX_set_cert(X509_STORE_CTX *ctx, X509 *target);
12718 void X509_STORE_CTX_set0_rpk(X509_STORE_CTX *ctx, EVP_PKEY *target);
12719 void X509_STORE_CTX_set0_verified_chain(X509_STORE_CTX *c, struct stack_st_X509 *sk);
12720 void X509_STORE_CTX_set0_crls(X509_STORE_CTX *ctx, struct stack_st_X509_CRL *sk);
12721 int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
12722 int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
12723 int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
12724 int purpose, int trust);
12725 void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
12726 void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
12727 time_t t);
12728 void X509_STORE_CTX_set_current_reasons(X509_STORE_CTX *ctx,
12729 unsigned int current_reasons);
12730
12731 X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(const X509_STORE_CTX *ctx);
12732 int X509_STORE_CTX_get_explicit_policy(const X509_STORE_CTX *ctx);
12733 int X509_STORE_CTX_get_num_untrusted(const X509_STORE_CTX *ctx);
12734
12735 X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(const X509_STORE_CTX *ctx);
12736 void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
12737 int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
12738
12739
12740
12741
12742
12743 void X509_STORE_CTX_set0_dane(X509_STORE_CTX *ctx, SSL_DANE *dane);
12744
12745
12746
12747
12748 X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void);
12749 void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param);
12750 int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to,
12751 const X509_VERIFY_PARAM *from);
12752 int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to,
12753 const X509_VERIFY_PARAM *from);
12754 int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);
12755 int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param,
12756 unsigned long flags);
12757 int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
12758 unsigned long flags);
12759 unsigned long X509_VERIFY_PARAM_get_flags(const X509_VERIFY_PARAM *param);
12760 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
12761 int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
12762 void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
12763 void X509_VERIFY_PARAM_set_auth_level(X509_VERIFY_PARAM *param, int auth_level);
12764 time_t X509_VERIFY_PARAM_get_time(const X509_VERIFY_PARAM *param);
12765 void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);
12766 int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,
12767 ASN1_OBJECT *policy);
12768 int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param,
12769 struct stack_st_ASN1_OBJECT *policies);
12770
12771 int X509_VERIFY_PARAM_set_inh_flags(X509_VERIFY_PARAM *param,
12772 uint32_t flags);
12773 uint32_t X509_VERIFY_PARAM_get_inh_flags(const X509_VERIFY_PARAM *param);
12774
12775 char *X509_VERIFY_PARAM_get0_host(X509_VERIFY_PARAM *param, int idx);
12776 int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param,
12777 const char *name, size_t namelen);
12778 int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param,
12779 const char *name, size_t namelen);
12780 void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
12781 unsigned int flags);
12782 unsigned int X509_VERIFY_PARAM_get_hostflags(const X509_VERIFY_PARAM *param);
12783 char *X509_VERIFY_PARAM_get0_peername(const X509_VERIFY_PARAM *param);
12784 void X509_VERIFY_PARAM_move_peername(X509_VERIFY_PARAM *, X509_VERIFY_PARAM *);
12785 char *X509_VERIFY_PARAM_get0_email(X509_VERIFY_PARAM *param);
12786 int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
12787 const char *email, size_t emaillen);
12788 char *X509_VERIFY_PARAM_get1_ip_asc(X509_VERIFY_PARAM *param);
12789 int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
12790 const unsigned char *ip, size_t iplen);
12791 int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param,
12792 const char *ipasc);
12793
12794 int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
12795 int X509_VERIFY_PARAM_get_auth_level(const X509_VERIFY_PARAM *param);
12796 const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param);
12797
12798 int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);
12799 int X509_VERIFY_PARAM_get_count(void);
12800 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id);
12801 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);
12802 void X509_VERIFY_PARAM_table_cleanup(void);
12803 # 871 "include/openssl/x509_vfy.h"
12804 int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
12805 struct stack_st_X509 *certs,
12806 struct stack_st_ASN1_OBJECT *policy_oids, unsigned int flags);
12807
12808 void X509_policy_tree_free(X509_POLICY_TREE *tree);
12809
12810 int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);
12811 X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree,
12812 int i);
12813
12814 struct stack_st_X509_POLICY_NODE
12815 *X509_policy_tree_get0_policies(const X509_POLICY_TREE *tree);
12816
12817 struct stack_st_X509_POLICY_NODE
12818 *X509_policy_tree_get0_user_policies(const X509_POLICY_TREE *tree);
12819
12820 int X509_policy_level_node_count(X509_POLICY_LEVEL *level);
12821
12822 X509_POLICY_NODE *X509_policy_level_get0_node(const X509_POLICY_LEVEL *level,
12823 int i);
12824
12825 const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);
12826
12827 struct stack_st_POLICYQUALINFO
12828 *X509_policy_node_get0_qualifiers(const X509_POLICY_NODE *node);
12829 const X509_POLICY_NODE
12830 *X509_policy_node_get0_parent(const X509_POLICY_NODE *node);
12831 # 483 "include/openssl/x509.h" 2
12832 # 1 "include/openssl/pkcs7.h" 1
12833 # 17 "include/openssl/pkcs7.h"
12834
12835 # 29 "include/openssl/pkcs7.h"
12836 # 1 "include/openssl/types.h" 1
12837 # 30 "include/openssl/pkcs7.h" 2
12838 # 1 "include/openssl/pkcs7err.h" 1
12839 # 13 "include/openssl/pkcs7err.h"
12840
12841 # 31 "include/openssl/pkcs7.h" 2
12842 # 47 "include/openssl/pkcs7.h"
12843 typedef struct PKCS7_CTX_st {
12844 OSSL_LIB_CTX *libctx;
12845 char *propq;
12846 } PKCS7_CTX;
12847
12848 typedef struct pkcs7_issuer_and_serial_st {
12849 X509_NAME *issuer;
12850 ASN1_INTEGER *serial;
12851 } PKCS7_ISSUER_AND_SERIAL;
12852
12853 typedef struct pkcs7_signer_info_st {
12854 ASN1_INTEGER *version;
12855 PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
12856 X509_ALGOR *digest_alg;
12857 struct stack_st_X509_ATTRIBUTE *auth_attr;
12858 X509_ALGOR *digest_enc_alg;
12859 ASN1_OCTET_STRING *enc_digest;
12860 struct stack_st_X509_ATTRIBUTE *unauth_attr;
12861
12862 EVP_PKEY *pkey;
12863 const PKCS7_CTX *ctx;
12864 } PKCS7_SIGNER_INFO;
12865 struct stack_st_PKCS7_SIGNER_INFO; typedef int (*sk_PKCS7_SIGNER_INFO_compfunc)(const PKCS7_SIGNER_INFO * const *a, const PKCS7_SIGNER_INFO *const *b); typedef void (*sk_PKCS7_SIGNER_INFO_freefunc)(PKCS7_SIGNER_INFO *a); typedef PKCS7_SIGNER_INFO * (*sk_PKCS7_SIGNER_INFO_copyfunc)(const PKCS7_SIGNER_INFO *a); static __attribute__((unused)) inline PKCS7_SIGNER_INFO *ossl_check_PKCS7_SIGNER_INFO_type(PKCS7_SIGNER_INFO *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_PKCS7_SIGNER_INFO_sk_type(const struct stack_st_PKCS7_SIGNER_INFO *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_PKCS7_SIGNER_INFO_sk_type(struct stack_st_PKCS7_SIGNER_INFO *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_PKCS7_SIGNER_INFO_compfunc_type(sk_PKCS7_SIGNER_INFO_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_PKCS7_SIGNER_INFO_copyfunc_type(sk_PKCS7_SIGNER_INFO_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_PKCS7_SIGNER_INFO_freefunc_type(sk_PKCS7_SIGNER_INFO_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12866 # 97 "include/openssl/pkcs7.h"
12867 typedef struct pkcs7_recip_info_st {
12868 ASN1_INTEGER *version;
12869 PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
12870 X509_ALGOR *key_enc_algor;
12871 ASN1_OCTET_STRING *enc_key;
12872 X509 *cert;
12873 const PKCS7_CTX *ctx;
12874 } PKCS7_RECIP_INFO;
12875 struct stack_st_PKCS7_RECIP_INFO; typedef int (*sk_PKCS7_RECIP_INFO_compfunc)(const PKCS7_RECIP_INFO * const *a, const PKCS7_RECIP_INFO *const *b); typedef void (*sk_PKCS7_RECIP_INFO_freefunc)(PKCS7_RECIP_INFO *a); typedef PKCS7_RECIP_INFO * (*sk_PKCS7_RECIP_INFO_copyfunc)(const PKCS7_RECIP_INFO *a); static __attribute__((unused)) inline PKCS7_RECIP_INFO *ossl_check_PKCS7_RECIP_INFO_type(PKCS7_RECIP_INFO *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_PKCS7_RECIP_INFO_sk_type(const struct stack_st_PKCS7_RECIP_INFO *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_PKCS7_RECIP_INFO_sk_type(struct stack_st_PKCS7_RECIP_INFO *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_PKCS7_RECIP_INFO_compfunc_type(sk_PKCS7_RECIP_INFO_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_PKCS7_RECIP_INFO_copyfunc_type(sk_PKCS7_RECIP_INFO_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_PKCS7_RECIP_INFO_freefunc_type(sk_PKCS7_RECIP_INFO_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12876 # 134 "include/openssl/pkcs7.h"
12877 typedef struct pkcs7_signed_st {
12878 ASN1_INTEGER *version;
12879 struct stack_st_X509_ALGOR *md_algs;
12880 struct stack_st_X509 *cert;
12881 struct stack_st_X509_CRL *crl;
12882 struct stack_st_PKCS7_SIGNER_INFO *signer_info;
12883 struct pkcs7_st *contents;
12884 } PKCS7_SIGNED;
12885
12886
12887
12888
12889
12890 typedef struct pkcs7_enc_content_st {
12891 ASN1_OBJECT *content_type;
12892 X509_ALGOR *algorithm;
12893 ASN1_OCTET_STRING *enc_data;
12894 const EVP_CIPHER *cipher;
12895 const PKCS7_CTX *ctx;
12896 } PKCS7_ENC_CONTENT;
12897
12898 typedef struct pkcs7_enveloped_st {
12899 ASN1_INTEGER *version;
12900 struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
12901 PKCS7_ENC_CONTENT *enc_data;
12902 } PKCS7_ENVELOPE;
12903
12904 typedef struct pkcs7_signedandenveloped_st {
12905 ASN1_INTEGER *version;
12906 struct stack_st_X509_ALGOR *md_algs;
12907 struct stack_st_X509 *cert;
12908 struct stack_st_X509_CRL *crl;
12909 struct stack_st_PKCS7_SIGNER_INFO *signer_info;
12910 PKCS7_ENC_CONTENT *enc_data;
12911 struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
12912 } PKCS7_SIGN_ENVELOPE;
12913
12914 typedef struct pkcs7_digest_st {
12915 ASN1_INTEGER *version;
12916 X509_ALGOR *md;
12917 struct pkcs7_st *contents;
12918 ASN1_OCTET_STRING *digest;
12919 } PKCS7_DIGEST;
12920
12921 typedef struct pkcs7_encrypted_st {
12922 ASN1_INTEGER *version;
12923 PKCS7_ENC_CONTENT *enc_data;
12924 } PKCS7_ENCRYPT;
12925
12926 typedef struct pkcs7_st {
12927
12928
12929
12930
12931 unsigned char *asn1;
12932 long length;
12933
12934
12935
12936 int state;
12937 int detached;
12938 ASN1_OBJECT *type;
12939
12940
12941
12942
12943
12944 union {
12945 char *ptr;
12946
12947 ASN1_OCTET_STRING *data;
12948
12949 PKCS7_SIGNED *sign;
12950
12951 PKCS7_ENVELOPE *enveloped;
12952
12953 PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
12954
12955 PKCS7_DIGEST *digest;
12956
12957 PKCS7_ENCRYPT *encrypted;
12958
12959 ASN1_TYPE *other;
12960 } d;
12961 PKCS7_CTX ctx;
12962 } PKCS7;
12963 struct stack_st_PKCS7; typedef int (*sk_PKCS7_compfunc)(const PKCS7 * const *a, const PKCS7 *const *b); typedef void (*sk_PKCS7_freefunc)(PKCS7 *a); typedef PKCS7 * (*sk_PKCS7_copyfunc)(const PKCS7 *a); static __attribute__((unused)) inline PKCS7 *ossl_check_PKCS7_type(PKCS7 *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_PKCS7_sk_type(const struct stack_st_PKCS7 *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_PKCS7_sk_type(struct stack_st_PKCS7 *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_PKCS7_compfunc_type(sk_PKCS7_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_PKCS7_copyfunc_type(sk_PKCS7_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_PKCS7_freefunc_type(sk_PKCS7_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12964 # 305 "include/openssl/pkcs7.h"
12965 extern PKCS7_ISSUER_AND_SERIAL *PKCS7_ISSUER_AND_SERIAL_new(void); extern void PKCS7_ISSUER_AND_SERIAL_free(PKCS7_ISSUER_AND_SERIAL *a); extern PKCS7_ISSUER_AND_SERIAL *d2i_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL **a, const unsigned char **in, long len); extern int i2d_PKCS7_ISSUER_AND_SERIAL(const PKCS7_ISSUER_AND_SERIAL *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_ISSUER_AND_SERIAL_it(void);
12966
12967 int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
12968 const EVP_MD *type, unsigned char *md,
12969 unsigned int *len);
12970
12971 PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
12972 int i2d_PKCS7_fp(FILE *fp, const PKCS7 *p7);
12973
12974 extern PKCS7 *PKCS7_dup(const PKCS7 *a);
12975 PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);
12976 int i2d_PKCS7_bio(BIO *bp, const PKCS7 *p7);
12977 int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
12978 int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
12979
12980 extern PKCS7_SIGNER_INFO *PKCS7_SIGNER_INFO_new(void); extern void PKCS7_SIGNER_INFO_free(PKCS7_SIGNER_INFO *a); extern PKCS7_SIGNER_INFO *d2i_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO **a, const unsigned char **in, long len); extern int i2d_PKCS7_SIGNER_INFO(const PKCS7_SIGNER_INFO *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_SIGNER_INFO_it(void);
12981 extern PKCS7_RECIP_INFO *PKCS7_RECIP_INFO_new(void); extern void PKCS7_RECIP_INFO_free(PKCS7_RECIP_INFO *a); extern PKCS7_RECIP_INFO *d2i_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO **a, const unsigned char **in, long len); extern int i2d_PKCS7_RECIP_INFO(const PKCS7_RECIP_INFO *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_RECIP_INFO_it(void);
12982 extern PKCS7_SIGNED *PKCS7_SIGNED_new(void); extern void PKCS7_SIGNED_free(PKCS7_SIGNED *a); extern PKCS7_SIGNED *d2i_PKCS7_SIGNED(PKCS7_SIGNED **a, const unsigned char **in, long len); extern int i2d_PKCS7_SIGNED(const PKCS7_SIGNED *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_SIGNED_it(void);
12983 extern PKCS7_ENC_CONTENT *PKCS7_ENC_CONTENT_new(void); extern void PKCS7_ENC_CONTENT_free(PKCS7_ENC_CONTENT *a); extern PKCS7_ENC_CONTENT *d2i_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT **a, const unsigned char **in, long len); extern int i2d_PKCS7_ENC_CONTENT(const PKCS7_ENC_CONTENT *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_ENC_CONTENT_it(void);
12984 extern PKCS7_ENVELOPE *PKCS7_ENVELOPE_new(void); extern void PKCS7_ENVELOPE_free(PKCS7_ENVELOPE *a); extern PKCS7_ENVELOPE *d2i_PKCS7_ENVELOPE(PKCS7_ENVELOPE **a, const unsigned char **in, long len); extern int i2d_PKCS7_ENVELOPE(const PKCS7_ENVELOPE *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_ENVELOPE_it(void);
12985 extern PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new(void); extern void PKCS7_SIGN_ENVELOPE_free(PKCS7_SIGN_ENVELOPE *a); extern PKCS7_SIGN_ENVELOPE *d2i_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE **a, const unsigned char **in, long len); extern int i2d_PKCS7_SIGN_ENVELOPE(const PKCS7_SIGN_ENVELOPE *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_SIGN_ENVELOPE_it(void);
12986 extern PKCS7_DIGEST *PKCS7_DIGEST_new(void); extern void PKCS7_DIGEST_free(PKCS7_DIGEST *a); extern PKCS7_DIGEST *d2i_PKCS7_DIGEST(PKCS7_DIGEST **a, const unsigned char **in, long len); extern int i2d_PKCS7_DIGEST(const PKCS7_DIGEST *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_DIGEST_it(void);
12987 extern PKCS7_ENCRYPT *PKCS7_ENCRYPT_new(void); extern void PKCS7_ENCRYPT_free(PKCS7_ENCRYPT *a); extern PKCS7_ENCRYPT *d2i_PKCS7_ENCRYPT(PKCS7_ENCRYPT **a, const unsigned char **in, long len); extern int i2d_PKCS7_ENCRYPT(const PKCS7_ENCRYPT *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_ENCRYPT_it(void);
12988 extern PKCS7 *PKCS7_new(void); extern void PKCS7_free(PKCS7 *a); extern PKCS7 *d2i_PKCS7(PKCS7 **a, const unsigned char **in, long len); extern int i2d_PKCS7(const PKCS7 *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_it(void);
12989 PKCS7 *PKCS7_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
12990
12991 extern const ASN1_ITEM * PKCS7_ATTR_SIGN_it(void);
12992 extern const ASN1_ITEM * PKCS7_ATTR_VERIFY_it(void);
12993
12994 extern int i2d_PKCS7_NDEF(const PKCS7 *a, unsigned char **out);
12995 extern int PKCS7_print_ctx(BIO *out, const PKCS7 *x, int indent, const ASN1_PCTX *pctx);
12996
12997 long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
12998
12999 int PKCS7_type_is_other(PKCS7 *p7);
13000 int PKCS7_set_type(PKCS7 *p7, int type);
13001 int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
13002 int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
13003 int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
13004 const EVP_MD *dgst);
13005 int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
13006 int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
13007 int PKCS7_add_certificate(PKCS7 *p7, X509 *cert);
13008 int PKCS7_add_crl(PKCS7 *p7, X509_CRL *crl);
13009 int PKCS7_content_new(PKCS7 *p7, int nid);
13010 int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
13011 BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
13012 int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
13013 X509 *signer);
13014
13015 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
13016 int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
13017 BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
13018
13019 PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
13020 EVP_PKEY *pkey, const EVP_MD *dgst);
13021 X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
13022 int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
13023 struct stack_st_PKCS7_SIGNER_INFO *PKCS7_get_signer_info(PKCS7 *p7);
13024
13025 PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
13026 void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
13027 X509_ALGOR **pdig, X509_ALGOR **psig);
13028 void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
13029 int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
13030 int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
13031 int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);
13032 int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);
13033
13034 PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
13035 ASN1_OCTET_STRING *PKCS7_get_octet_string(PKCS7 *p7);
13036 ASN1_OCTET_STRING *PKCS7_digest_from_attributes(struct stack_st_X509_ATTRIBUTE *sk);
13037 int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type,
13038 void *data);
13039 int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
13040 void *value);
13041 ASN1_TYPE *PKCS7_get_attribute(const PKCS7_SIGNER_INFO *si, int nid);
13042 ASN1_TYPE *PKCS7_get_signed_attribute(const PKCS7_SIGNER_INFO *si, int nid);
13043 int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
13044 struct stack_st_X509_ATTRIBUTE *sk);
13045 int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,
13046 struct stack_st_X509_ATTRIBUTE *sk);
13047
13048 PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, struct stack_st_X509 *certs,
13049 BIO *data, int flags);
13050 PKCS7 *PKCS7_sign_ex(X509 *signcert, EVP_PKEY *pkey, struct stack_st_X509 *certs,
13051 BIO *data, int flags, OSSL_LIB_CTX *libctx,
13052 const char *propq);
13053
13054 PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
13055 X509 *signcert, EVP_PKEY *pkey,
13056 const EVP_MD *md, int flags);
13057
13058 int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
13059 int PKCS7_verify(PKCS7 *p7, struct stack_st_X509 *certs, X509_STORE *store,
13060 BIO *indata, BIO *out, int flags);
13061 struct stack_st_X509 *PKCS7_get0_signers(PKCS7 *p7, struct stack_st_X509 *certs,
13062 int flags);
13063 PKCS7 *PKCS7_encrypt(struct stack_st_X509 *certs, BIO *in, const EVP_CIPHER *cipher,
13064 int flags);
13065 PKCS7 *PKCS7_encrypt_ex(struct stack_st_X509 *certs, BIO *in,
13066 const EVP_CIPHER *cipher, int flags,
13067 OSSL_LIB_CTX *libctx, const char *propq);
13068 int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,
13069 int flags);
13070
13071 int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
13072 struct stack_st_X509_ALGOR *cap);
13073 struct stack_st_X509_ALGOR *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
13074 int PKCS7_simple_smimecap(struct stack_st_X509_ALGOR *sk, int nid, int arg);
13075
13076 int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
13077 int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
13078 int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
13079 const unsigned char *md, int mdlen);
13080
13081 int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
13082 PKCS7 *SMIME_read_PKCS7_ex(BIO *bio, BIO **bcont, PKCS7 **p7);
13083 PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
13084
13085 BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
13086 # 484 "include/openssl/x509.h" 2
13087 # 496 "include/openssl/x509.h"
13088 void X509_CRL_set_default_method(const X509_CRL_METHOD *meth);
13089 X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),
13090 int (*crl_free) (X509_CRL *crl),
13091 int (*crl_lookup) (X509_CRL *crl,
13092 X509_REVOKED **ret,
13093 const
13094 ASN1_INTEGER *serial,
13095 const
13096 X509_NAME *issuer),
13097 int (*crl_verify) (X509_CRL *crl,
13098 EVP_PKEY *pk));
13099 void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
13100
13101 void X509_CRL_set_meth_data(X509_CRL *crl, void *dat);
13102 void *X509_CRL_get_meth_data(X509_CRL *crl);
13103
13104 const char *X509_verify_cert_error_string(long n);
13105
13106 int X509_verify(X509 *a, EVP_PKEY *r);
13107 int X509_self_signed(X509 *cert, int verify_signature);
13108
13109 int X509_REQ_verify_ex(X509_REQ *a, EVP_PKEY *r, OSSL_LIB_CTX *libctx,
13110 const char *propq);
13111 int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
13112 int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r);
13113 int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r);
13114
13115 NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len);
13116 char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);
13117 EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);
13118 int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
13119
13120 int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);
13121
13122 int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);
13123 int X509_signature_print(BIO *bp, const X509_ALGOR *alg,
13124 const ASN1_STRING *sig);
13125
13126 int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
13127 int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
13128 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
13129 int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
13130 int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
13131 int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
13132 int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);
13133
13134 int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
13135 unsigned char *md, unsigned int *len);
13136 int X509_digest(const X509 *data, const EVP_MD *type,
13137 unsigned char *md, unsigned int *len);
13138 ASN1_OCTET_STRING *X509_digest_sig(const X509 *cert,
13139 EVP_MD **md_used, int *md_is_fallback);
13140 int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type,
13141 unsigned char *md, unsigned int *len);
13142 int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
13143 unsigned char *md, unsigned int *len);
13144 int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
13145 unsigned char *md, unsigned int *len);
13146
13147 X509 *X509_load_http(const char *url, BIO *bio, BIO *rbio, int timeout);
13148 X509_CRL *X509_CRL_load_http(const char *url, BIO *bio, BIO *rbio, int timeout);
13149
13150 # 1 "include/openssl/http.h" 1
13151 # 13 "include/openssl/http.h"
13152
13153
13154
13155
13156
13157
13158 # 1 "include/openssl/conf.h" 1
13159 # 17 "include/openssl/conf.h"
13160
13161 # 28 "include/openssl/conf.h"
13162 # 1 "include/openssl/types.h" 1
13163 # 29 "include/openssl/conf.h" 2
13164 # 1 "include/openssl/conferr.h" 1
13165 # 13 "include/openssl/conferr.h"
13166
13167 # 30 "include/openssl/conf.h" 2
13168 # 38 "include/openssl/conf.h"
13169 typedef struct {
13170 char *section;
13171 char *name;
13172 char *value;
13173 } CONF_VALUE;
13174
13175 struct stack_st_CONF_VALUE; typedef int (*sk_CONF_VALUE_compfunc)(const CONF_VALUE * const *a, const CONF_VALUE *const *b); typedef void (*sk_CONF_VALUE_freefunc)(CONF_VALUE *a); typedef CONF_VALUE * (*sk_CONF_VALUE_copyfunc)(const CONF_VALUE *a); static __attribute__((unused)) inline CONF_VALUE *ossl_check_CONF_VALUE_type(CONF_VALUE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_CONF_VALUE_sk_type(const struct stack_st_CONF_VALUE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_CONF_VALUE_sk_type(struct stack_st_CONF_VALUE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_CONF_VALUE_compfunc_type(sk_CONF_VALUE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_CONF_VALUE_copyfunc_type(sk_CONF_VALUE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_CONF_VALUE_freefunc_type(sk_CONF_VALUE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
13176 # 70 "include/openssl/conf.h"
13177 struct lhash_st_CONF_VALUE { union lh_CONF_VALUE_dummy { void* d1; unsigned long d2; int d3; } dummy; }; typedef int (*lh_CONF_VALUE_compfunc)(const CONF_VALUE *a, const CONF_VALUE *b); typedef unsigned long (*lh_CONF_VALUE_hashfunc)(const CONF_VALUE *a); typedef void (*lh_CONF_VALUE_doallfunc)(CONF_VALUE *a); static inline unsigned long lh_CONF_VALUE_hash_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) { unsigned long (*hfn_conv)(const CONF_VALUE *) = (unsigned long (*)(const CONF_VALUE *))hfn; return hfn_conv((const CONF_VALUE *)data); } static inline int lh_CONF_VALUE_comp_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) { int (*cfn_conv)(const CONF_VALUE *, const CONF_VALUE *) = (int (*)(const CONF_VALUE *, const CONF_VALUE *))cfn; return cfn_conv((const CONF_VALUE *)da, (const CONF_VALUE *)db); } static inline void lh_CONF_VALUE_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) { void (*doall_conv)(CONF_VALUE *) = (void (*)(CONF_VALUE *))doall; doall_conv((CONF_VALUE *)node); } static inline void lh_CONF_VALUE_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) { void (*doall_conv)(CONF_VALUE *, void *) = (void (*)(CONF_VALUE *, void *))doall; doall_conv((CONF_VALUE *)node, arg); } static __attribute__((unused)) inline CONF_VALUE * ossl_check_CONF_VALUE_lh_plain_type(CONF_VALUE *ptr) { return ptr; } static __attribute__((unused)) inline const CONF_VALUE * ossl_check_const_CONF_VALUE_lh_plain_type(const CONF_VALUE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_LHASH * ossl_check_const_CONF_VALUE_lh_type(const struct lhash_st_CONF_VALUE *lh) { return (const OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LHASH * ossl_check_CONF_VALUE_lh_type(struct lhash_st_CONF_VALUE *lh) { return (OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LH_COMPFUNC ossl_check_CONF_VALUE_lh_compfunc_type(lh_CONF_VALUE_compfunc cmp) { return (OPENSSL_LH_COMPFUNC)cmp; } static __attribute__((unused)) inline OPENSSL_LH_HASHFUNC ossl_check_CONF_VALUE_lh_hashfunc_type(lh_CONF_VALUE_hashfunc hfn) { return (OPENSSL_LH_HASHFUNC)hfn; } static __attribute__((unused)) inline OPENSSL_LH_DOALL_FUNC ossl_check_CONF_VALUE_lh_doallfunc_type(lh_CONF_VALUE_doallfunc dfn) { return (OPENSSL_LH_DOALL_FUNC)dfn; } struct lhash_st_CONF_VALUE;
13178 # 87 "include/openssl/conf.h"
13179 struct conf_st;
13180 struct conf_method_st;
13181 typedef struct conf_method_st CONF_METHOD;
13182
13183
13184 # 1 "include/openssl/conftypes.h" 1
13185 # 12 "include/openssl/conftypes.h"
13186
13187 # 21 "include/openssl/conftypes.h"
13188 struct conf_method_st {
13189 const char *name;
13190 CONF *(*create) (CONF_METHOD *meth);
13191 int (*init) (CONF *conf);
13192 int (*destroy) (CONF *conf);
13193 int (*destroy_data) (CONF *conf);
13194 int (*load_bio) (CONF *conf, BIO *bp, long *eline);
13195 int (*dump) (const CONF *conf, BIO *bp);
13196 int (*is_number) (const CONF *conf, char c);
13197 int (*to_int) (const CONF *conf, char c);
13198 int (*load) (CONF *conf, const char *name, long *eline);
13199 };
13200
13201 struct conf_st {
13202 CONF_METHOD *meth;
13203 void *meth_data;
13204 struct lhash_st_CONF_VALUE *data;
13205 int flag_dollarid;
13206 int flag_abspath;
13207 char *includedir;
13208 OSSL_LIB_CTX *libctx;
13209 };
13210 # 93 "include/openssl/conf.h" 2
13211
13212
13213
13214 typedef struct conf_imodule_st CONF_IMODULE;
13215 typedef struct conf_module_st CONF_MODULE;
13216
13217 struct stack_st_CONF_MODULE;
13218 struct stack_st_CONF_IMODULE;
13219
13220
13221 typedef int conf_init_func (CONF_IMODULE *md, const CONF *cnf);
13222 typedef void conf_finish_func (CONF_IMODULE *md);
13223 # 113 "include/openssl/conf.h"
13224 int CONF_set_default_method(CONF_METHOD *meth);
13225 void CONF_set_nconf(CONF *conf, struct lhash_st_CONF_VALUE *hash);
13226 struct lhash_st_CONF_VALUE *CONF_load(struct lhash_st_CONF_VALUE *conf, const char *file,
13227 long *eline);
13228
13229 struct lhash_st_CONF_VALUE *CONF_load_fp(struct lhash_st_CONF_VALUE *conf, FILE *fp,
13230 long *eline);
13231
13232 struct lhash_st_CONF_VALUE *CONF_load_bio(struct lhash_st_CONF_VALUE *conf, BIO *bp,
13233 long *eline);
13234 struct stack_st_CONF_VALUE *CONF_get_section(struct lhash_st_CONF_VALUE *conf,
13235 const char *section);
13236 char *CONF_get_string(struct lhash_st_CONF_VALUE *conf, const char *group,
13237 const char *name);
13238 long CONF_get_number(struct lhash_st_CONF_VALUE *conf, const char *group,
13239 const char *name);
13240 void CONF_free(struct lhash_st_CONF_VALUE *conf);
13241
13242 int CONF_dump_fp(struct lhash_st_CONF_VALUE *conf, FILE *out);
13243
13244 int CONF_dump_bio(struct lhash_st_CONF_VALUE *conf, BIO *out);
13245
13246 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) void OPENSSL_config(const char *config_name);
13247 # 148 "include/openssl/conf.h"
13248 CONF *NCONF_new_ex(OSSL_LIB_CTX *libctx, CONF_METHOD *meth);
13249 OSSL_LIB_CTX *NCONF_get0_libctx(const CONF *conf);
13250 CONF *NCONF_new(CONF_METHOD *meth);
13251 CONF_METHOD *NCONF_default(void);
13252
13253 __attribute__((deprecated("Since OpenSSL " "3.0"))) CONF_METHOD *NCONF_WIN32(void);
13254
13255 void NCONF_free(CONF *conf);
13256 void NCONF_free_data(CONF *conf);
13257
13258 int NCONF_load(CONF *conf, const char *file, long *eline);
13259
13260 int NCONF_load_fp(CONF *conf, FILE *fp, long *eline);
13261
13262 int NCONF_load_bio(CONF *conf, BIO *bp, long *eline);
13263 struct stack_st_OPENSSL_CSTRING *NCONF_get_section_names(const CONF *conf);
13264 struct stack_st_CONF_VALUE *NCONF_get_section(const CONF *conf,
13265 const char *section);
13266 char *NCONF_get_string(const CONF *conf, const char *group, const char *name);
13267 int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
13268 long *result);
13269
13270 int NCONF_dump_fp(const CONF *conf, FILE *out);
13271
13272 int NCONF_dump_bio(const CONF *conf, BIO *out);
13273
13274
13275
13276
13277
13278 int CONF_modules_load(const CONF *cnf, const char *appname,
13279 unsigned long flags);
13280 int CONF_modules_load_file_ex(OSSL_LIB_CTX *libctx, const char *filename,
13281 const char *appname, unsigned long flags);
13282 int CONF_modules_load_file(const char *filename, const char *appname,
13283 unsigned long flags);
13284 void CONF_modules_unload(int all);
13285 void CONF_modules_finish(void);
13286
13287
13288
13289 int CONF_module_add(const char *name, conf_init_func *ifunc,
13290 conf_finish_func *ffunc);
13291
13292 const char *CONF_imodule_get_name(const CONF_IMODULE *md);
13293 const char *CONF_imodule_get_value(const CONF_IMODULE *md);
13294 void *CONF_imodule_get_usr_data(const CONF_IMODULE *md);
13295 void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data);
13296 CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md);
13297 unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md);
13298 void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags);
13299 void *CONF_module_get_usr_data(CONF_MODULE *pmod);
13300 void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);
13301
13302 char *CONF_get1_default_config_file(void);
13303
13304 int CONF_parse_list(const char *list, int sep, int nospc,
13305 int (*list_cb) (const char *elem, int len, void *usr),
13306 void *arg);
13307
13308 void OPENSSL_load_builtin_modules(void);
13309 # 20 "include/openssl/http.h" 2
13310 # 44 "include/openssl/http.h"
13311 OSSL_HTTP_REQ_CTX *OSSL_HTTP_REQ_CTX_new(BIO *wbio, BIO *rbio, int buf_size);
13312 void OSSL_HTTP_REQ_CTX_free(OSSL_HTTP_REQ_CTX *rctx);
13313 int OSSL_HTTP_REQ_CTX_set_request_line(OSSL_HTTP_REQ_CTX *rctx, int method_POST,
13314 const char *server, const char *port,
13315 const char *path);
13316 int OSSL_HTTP_REQ_CTX_add1_header(OSSL_HTTP_REQ_CTX *rctx,
13317 const char *name, const char *value);
13318 int OSSL_HTTP_REQ_CTX_set_expected(OSSL_HTTP_REQ_CTX *rctx,
13319 const char *content_type, int asn1,
13320 int timeout, int keep_alive);
13321 int OSSL_HTTP_REQ_CTX_set1_req(OSSL_HTTP_REQ_CTX *rctx, const char *content_type,
13322 const ASN1_ITEM *it, const ASN1_VALUE *req);
13323 int OSSL_HTTP_REQ_CTX_nbio(OSSL_HTTP_REQ_CTX *rctx);
13324 int OSSL_HTTP_REQ_CTX_nbio_d2i(OSSL_HTTP_REQ_CTX *rctx,
13325 ASN1_VALUE **pval, const ASN1_ITEM *it);
13326 BIO *OSSL_HTTP_REQ_CTX_exchange(OSSL_HTTP_REQ_CTX *rctx);
13327 BIO *OSSL_HTTP_REQ_CTX_get0_mem_bio(const OSSL_HTTP_REQ_CTX *rctx);
13328 size_t OSSL_HTTP_REQ_CTX_get_resp_len(const OSSL_HTTP_REQ_CTX *rctx);
13329 void OSSL_HTTP_REQ_CTX_set_max_response_length(OSSL_HTTP_REQ_CTX *rctx,
13330 unsigned long len);
13331 int OSSL_HTTP_is_alive(const OSSL_HTTP_REQ_CTX *rctx);
13332
13333
13334 typedef BIO *(*OSSL_HTTP_bio_cb_t)(BIO *bio, void *arg, int connect, int detail);
13335 OSSL_HTTP_REQ_CTX *OSSL_HTTP_open(const char *server, const char *port,
13336 const char *proxy, const char *no_proxy,
13337 int use_ssl, BIO *bio, BIO *rbio,
13338 OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
13339 int buf_size, int overall_timeout);
13340 int OSSL_HTTP_proxy_connect(BIO *bio, const char *server, const char *port,
13341 const char *proxyuser, const char *proxypass,
13342 int timeout, BIO *bio_err, const char *prog);
13343 int OSSL_HTTP_set1_request(OSSL_HTTP_REQ_CTX *rctx, const char *path,
13344 const struct stack_st_CONF_VALUE *headers,
13345 const char *content_type, BIO *req,
13346 const char *expected_content_type, int expect_asn1,
13347 size_t max_resp_len, int timeout, int keep_alive);
13348 BIO *OSSL_HTTP_exchange(OSSL_HTTP_REQ_CTX *rctx, char **redirection_url);
13349 BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *no_proxy,
13350 BIO *bio, BIO *rbio,
13351 OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
13352 int buf_size, const struct stack_st_CONF_VALUE *headers,
13353 const char *expected_content_type, int expect_asn1,
13354 size_t max_resp_len, int timeout);
13355 BIO *OSSL_HTTP_transfer(OSSL_HTTP_REQ_CTX **prctx,
13356 const char *server, const char *port,
13357 const char *path, int use_ssl,
13358 const char *proxy, const char *no_proxy,
13359 BIO *bio, BIO *rbio,
13360 OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
13361 int buf_size, const struct stack_st_CONF_VALUE *headers,
13362 const char *content_type, BIO *req,
13363 const char *expected_content_type, int expect_asn1,
13364 size_t max_resp_len, int timeout, int keep_alive);
13365 int OSSL_HTTP_close(OSSL_HTTP_REQ_CTX *rctx, int ok);
13366
13367
13368 int OSSL_parse_url(const char *url, char **pscheme, char **puser, char **phost,
13369 char **pport, int *pport_num,
13370 char **ppath, char **pquery, char **pfrag);
13371 int OSSL_HTTP_parse_url(const char *url, int *pssl, char **puser, char **phost,
13372 char **pport, int *pport_num,
13373 char **ppath, char **pquery, char **pfrag);
13374 const char *OSSL_HTTP_adapt_proxy(const char *proxy, const char *no_proxy,
13375 const char *server, int use_ssl);
13376
13377 void OSSL_HTTP_REQ_CTX_set_max_response_hdr_lines(OSSL_HTTP_REQ_CTX *rctx,
13378 size_t count);
13379 # 559 "include/openssl/x509.h" 2
13380
13381
13382
13383
13384
13385
13386
13387 X509 *d2i_X509_fp(FILE *fp, X509 **x509);
13388 int i2d_X509_fp(FILE *fp, const X509 *x509);
13389 X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl);
13390 int i2d_X509_CRL_fp(FILE *fp, const X509_CRL *crl);
13391 X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req);
13392 int i2d_X509_REQ_fp(FILE *fp, const X509_REQ *req);
13393
13394 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa);
13395 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSAPrivateKey_fp(FILE *fp, const RSA *rsa);
13396 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa);
13397 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSAPublicKey_fp(FILE *fp, const RSA *rsa);
13398 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);
13399 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSA_PUBKEY_fp(FILE *fp, const RSA *rsa);
13400
13401
13402
13403 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
13404 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSA_PUBKEY_fp(FILE *fp, const DSA *dsa);
13405 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
13406 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSAPrivateKey_fp(FILE *fp, const DSA *dsa);
13407
13408
13409
13410
13411 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
13412 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_EC_PUBKEY_fp(FILE *fp, const EC_KEY *eckey);
13413 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
13414 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_ECPrivateKey_fp(FILE *fp, const EC_KEY *eckey);
13415
13416
13417 X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8);
13418 int i2d_PKCS8_fp(FILE *fp, const X509_SIG *p8);
13419 X509_PUBKEY *d2i_X509_PUBKEY_fp(FILE *fp, X509_PUBKEY **xpk);
13420 int i2d_X509_PUBKEY_fp(FILE *fp, const X509_PUBKEY *xpk);
13421 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
13422 PKCS8_PRIV_KEY_INFO **p8inf);
13423 int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, const PKCS8_PRIV_KEY_INFO *p8inf);
13424 int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, const EVP_PKEY *key);
13425 int i2d_PrivateKey_fp(FILE *fp, const EVP_PKEY *pkey);
13426 EVP_PKEY *d2i_PrivateKey_ex_fp(FILE *fp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
13427 const char *propq);
13428 EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
13429 int i2d_PUBKEY_fp(FILE *fp, const EVP_PKEY *pkey);
13430 EVP_PKEY *d2i_PUBKEY_ex_fp(FILE *fp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
13431 const char *propq);
13432 EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
13433
13434
13435 X509 *d2i_X509_bio(BIO *bp, X509 **x509);
13436 int i2d_X509_bio(BIO *bp, const X509 *x509);
13437 X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);
13438 int i2d_X509_CRL_bio(BIO *bp, const X509_CRL *crl);
13439 X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req);
13440 int i2d_X509_REQ_bio(BIO *bp, const X509_REQ *req);
13441
13442 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa);
13443 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSAPrivateKey_bio(BIO *bp, const RSA *rsa);
13444 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);
13445 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSAPublicKey_bio(BIO *bp, const RSA *rsa);
13446 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);
13447 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSA_PUBKEY_bio(BIO *bp, const RSA *rsa);
13448
13449
13450
13451 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
13452 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSA_PUBKEY_bio(BIO *bp, const DSA *dsa);
13453 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
13454 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSAPrivateKey_bio(BIO *bp, const DSA *dsa);
13455
13456
13457
13458
13459
13460 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
13461 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_EC_PUBKEY_bio(BIO *bp, const EC_KEY *eckey);
13462 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
13463 __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_ECPrivateKey_bio(BIO *bp, const EC_KEY *eckey);
13464
13465
13466
13467 X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8);
13468 int i2d_PKCS8_bio(BIO *bp, const X509_SIG *p8);
13469 X509_PUBKEY *d2i_X509_PUBKEY_bio(BIO *bp, X509_PUBKEY **xpk);
13470 int i2d_X509_PUBKEY_bio(BIO *bp, const X509_PUBKEY *xpk);
13471 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
13472 PKCS8_PRIV_KEY_INFO **p8inf);
13473 int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, const PKCS8_PRIV_KEY_INFO *p8inf);
13474 int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, const EVP_PKEY *key);
13475 int i2d_PrivateKey_bio(BIO *bp, const EVP_PKEY *pkey);
13476 EVP_PKEY *d2i_PrivateKey_ex_bio(BIO *bp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
13477 const char *propq);
13478 EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
13479 int i2d_PUBKEY_bio(BIO *bp, const EVP_PKEY *pkey);
13480 EVP_PKEY *d2i_PUBKEY_ex_bio(BIO *bp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
13481 const char *propq);
13482 EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
13483
13484 extern X509 *X509_dup(const X509 *a);
13485 extern X509_ALGOR *X509_ALGOR_dup(const X509_ALGOR *a);
13486 extern X509_ATTRIBUTE *X509_ATTRIBUTE_dup(const X509_ATTRIBUTE *a);
13487 extern X509_CRL *X509_CRL_dup(const X509_CRL *a);
13488 extern X509_EXTENSION *X509_EXTENSION_dup(const X509_EXTENSION *a);
13489 extern X509_PUBKEY *X509_PUBKEY_dup(const X509_PUBKEY *a);
13490 extern X509_REQ *X509_REQ_dup(const X509_REQ *a);
13491 extern X509_REVOKED *X509_REVOKED_dup(const X509_REVOKED *a);
13492 int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype,
13493 void *pval);
13494 void X509_ALGOR_get0(const ASN1_OBJECT **paobj, int *pptype,
13495 const void **ppval, const X509_ALGOR *algor);
13496 void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
13497 int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
13498 int X509_ALGOR_copy(X509_ALGOR *dest, const X509_ALGOR *src);
13499
13500 extern X509_NAME *X509_NAME_dup(const X509_NAME *a);
13501 extern X509_NAME_ENTRY *X509_NAME_ENTRY_dup(const X509_NAME_ENTRY *a);
13502
13503 int X509_cmp_time(const ASN1_TIME *s, time_t *t);
13504 int X509_cmp_current_time(const ASN1_TIME *s);
13505 int X509_cmp_timeframe(const X509_VERIFY_PARAM *vpm,
13506 const ASN1_TIME *start, const ASN1_TIME *end);
13507 ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
13508 ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
13509 int offset_day, long offset_sec, time_t *t);
13510 ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj);
13511
13512 const char *X509_get_default_cert_area(void);
13513 const char *X509_get_default_cert_dir(void);
13514 const char *X509_get_default_cert_file(void);
13515 const char *X509_get_default_cert_dir_env(void);
13516 const char *X509_get_default_cert_file_env(void);
13517 const char *X509_get_default_private_dir(void);
13518
13519 X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
13520 X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey);
13521
13522 extern X509_ALGOR *X509_ALGOR_new(void); extern void X509_ALGOR_free(X509_ALGOR *a); extern X509_ALGOR *d2i_X509_ALGOR(X509_ALGOR **a, const unsigned char **in, long len); extern int i2d_X509_ALGOR(const X509_ALGOR *a, unsigned char **out); extern const ASN1_ITEM * X509_ALGOR_it(void);
13523 extern X509_ALGORS *d2i_X509_ALGORS(X509_ALGORS **a, const unsigned char **in, long len); extern int i2d_X509_ALGORS(const X509_ALGORS *a, unsigned char **out); extern const ASN1_ITEM * X509_ALGORS_it(void);
13524 extern X509_VAL *X509_VAL_new(void); extern void X509_VAL_free(X509_VAL *a); extern X509_VAL *d2i_X509_VAL(X509_VAL **a, const unsigned char **in, long len); extern int i2d_X509_VAL(const X509_VAL *a, unsigned char **out); extern const ASN1_ITEM * X509_VAL_it(void);
13525
13526 extern X509_PUBKEY *X509_PUBKEY_new(void); extern void X509_PUBKEY_free(X509_PUBKEY *a); extern X509_PUBKEY *d2i_X509_PUBKEY(X509_PUBKEY **a, const unsigned char **in, long len); extern int i2d_X509_PUBKEY(const X509_PUBKEY *a, unsigned char **out); extern const ASN1_ITEM * X509_PUBKEY_it(void);
13527
13528 X509_PUBKEY *X509_PUBKEY_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
13529 int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
13530 EVP_PKEY *X509_PUBKEY_get0(const X509_PUBKEY *key);
13531 EVP_PKEY *X509_PUBKEY_get(const X509_PUBKEY *key);
13532 int X509_get_pubkey_parameters(EVP_PKEY *pkey, struct stack_st_X509 *chain);
13533 long X509_get_pathlen(X509 *x);
13534 extern EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **in, long len); extern int i2d_PUBKEY(const EVP_PKEY *a, unsigned char **out);
13535 EVP_PKEY *d2i_PUBKEY_ex(EVP_PKEY **a, const unsigned char **pp, long length,
13536 OSSL_LIB_CTX *libctx, const char *propq);
13537
13538 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSA_PUBKEY(const RSA *a, unsigned char **out);
13539
13540
13541
13542 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSA_PUBKEY(const DSA *a, unsigned char **out);
13543
13544
13545
13546
13547 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_EC_PUBKEY(const EC_KEY *a, unsigned char **out);
13548
13549
13550
13551 extern X509_SIG *X509_SIG_new(void); extern void X509_SIG_free(X509_SIG *a); extern X509_SIG *d2i_X509_SIG(X509_SIG **a, const unsigned char **in, long len); extern int i2d_X509_SIG(const X509_SIG *a, unsigned char **out); extern const ASN1_ITEM * X509_SIG_it(void);
13552 void X509_SIG_get0(const X509_SIG *sig, const X509_ALGOR **palg,
13553 const ASN1_OCTET_STRING **pdigest);
13554 void X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg,
13555 ASN1_OCTET_STRING **pdigest);
13556
13557 extern X509_REQ_INFO *X509_REQ_INFO_new(void); extern void X509_REQ_INFO_free(X509_REQ_INFO *a); extern X509_REQ_INFO *d2i_X509_REQ_INFO(X509_REQ_INFO **a, const unsigned char **in, long len); extern int i2d_X509_REQ_INFO(const X509_REQ_INFO *a, unsigned char **out); extern const ASN1_ITEM * X509_REQ_INFO_it(void);
13558 extern X509_REQ *X509_REQ_new(void); extern void X509_REQ_free(X509_REQ *a); extern X509_REQ *d2i_X509_REQ(X509_REQ **a, const unsigned char **in, long len); extern int i2d_X509_REQ(const X509_REQ *a, unsigned char **out); extern const ASN1_ITEM * X509_REQ_it(void);
13559 X509_REQ *X509_REQ_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
13560
13561 extern X509_ATTRIBUTE *X509_ATTRIBUTE_new(void); extern void X509_ATTRIBUTE_free(X509_ATTRIBUTE *a); extern X509_ATTRIBUTE *d2i_X509_ATTRIBUTE(X509_ATTRIBUTE **a, const unsigned char **in, long len); extern int i2d_X509_ATTRIBUTE(const X509_ATTRIBUTE *a, unsigned char **out); extern const ASN1_ITEM * X509_ATTRIBUTE_it(void);
13562 X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
13563
13564 extern X509_EXTENSION *X509_EXTENSION_new(void); extern void X509_EXTENSION_free(X509_EXTENSION *a); extern X509_EXTENSION *d2i_X509_EXTENSION(X509_EXTENSION **a, const unsigned char **in, long len); extern int i2d_X509_EXTENSION(const X509_EXTENSION *a, unsigned char **out); extern const ASN1_ITEM * X509_EXTENSION_it(void);
13565 extern X509_EXTENSIONS *d2i_X509_EXTENSIONS(X509_EXTENSIONS **a, const unsigned char **in, long len); extern int i2d_X509_EXTENSIONS(const X509_EXTENSIONS *a, unsigned char **out); extern const ASN1_ITEM * X509_EXTENSIONS_it(void);
13566
13567 extern X509_NAME_ENTRY *X509_NAME_ENTRY_new(void); extern void X509_NAME_ENTRY_free(X509_NAME_ENTRY *a); extern X509_NAME_ENTRY *d2i_X509_NAME_ENTRY(X509_NAME_ENTRY **a, const unsigned char **in, long len); extern int i2d_X509_NAME_ENTRY(const X509_NAME_ENTRY *a, unsigned char **out); extern const ASN1_ITEM * X509_NAME_ENTRY_it(void);
13568
13569 extern X509_NAME *X509_NAME_new(void); extern void X509_NAME_free(X509_NAME *a); extern X509_NAME *d2i_X509_NAME(X509_NAME **a, const unsigned char **in, long len); extern int i2d_X509_NAME(const X509_NAME *a, unsigned char **out); extern const ASN1_ITEM * X509_NAME_it(void);
13570
13571 int X509_NAME_set(X509_NAME **xn, const X509_NAME *name);
13572
13573 extern X509_CINF *X509_CINF_new(void); extern void X509_CINF_free(X509_CINF *a); extern X509_CINF *d2i_X509_CINF(X509_CINF **a, const unsigned char **in, long len); extern int i2d_X509_CINF(const X509_CINF *a, unsigned char **out); extern const ASN1_ITEM * X509_CINF_it(void);
13574 extern X509 *X509_new(void); extern void X509_free(X509 *a); extern X509 *d2i_X509(X509 **a, const unsigned char **in, long len); extern int i2d_X509(const X509 *a, unsigned char **out); extern const ASN1_ITEM * X509_it(void);
13575 X509 *X509_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
13576 extern X509_CERT_AUX *X509_CERT_AUX_new(void); extern void X509_CERT_AUX_free(X509_CERT_AUX *a); extern X509_CERT_AUX *d2i_X509_CERT_AUX(X509_CERT_AUX **a, const unsigned char **in, long len); extern int i2d_X509_CERT_AUX(const X509_CERT_AUX *a, unsigned char **out); extern const ASN1_ITEM * X509_CERT_AUX_it(void);
13577
13578
13579
13580 int X509_set_ex_data(X509 *r, int idx, void *arg);
13581 void *X509_get_ex_data(const X509 *r, int idx);
13582 extern X509 *d2i_X509_AUX(X509 **a, const unsigned char **in, long len); extern int i2d_X509_AUX(const X509 *a, unsigned char **out);
13583
13584 int i2d_re_X509_tbs(X509 *x, unsigned char **pp);
13585
13586 int X509_SIG_INFO_get(const X509_SIG_INFO *siginf, int *mdnid, int *pknid,
13587 int *secbits, uint32_t *flags);
13588 void X509_SIG_INFO_set(X509_SIG_INFO *siginf, int mdnid, int pknid,
13589 int secbits, uint32_t flags);
13590
13591 int X509_get_signature_info(X509 *x, int *mdnid, int *pknid, int *secbits,
13592 uint32_t *flags);
13593
13594 void X509_get0_signature(const ASN1_BIT_STRING **psig,
13595 const X509_ALGOR **palg, const X509 *x);
13596 int X509_get_signature_nid(const X509 *x);
13597
13598 void X509_set0_distinguishing_id(X509 *x, ASN1_OCTET_STRING *d_id);
13599 ASN1_OCTET_STRING *X509_get0_distinguishing_id(X509 *x);
13600 void X509_REQ_set0_distinguishing_id(X509_REQ *x, ASN1_OCTET_STRING *d_id);
13601 ASN1_OCTET_STRING *X509_REQ_get0_distinguishing_id(X509_REQ *x);
13602
13603 int X509_alias_set1(X509 *x, const unsigned char *name, int len);
13604 int X509_keyid_set1(X509 *x, const unsigned char *id, int len);
13605 unsigned char *X509_alias_get0(X509 *x, int *len);
13606 unsigned char *X509_keyid_get0(X509 *x, int *len);
13607
13608 extern X509_REVOKED *X509_REVOKED_new(void); extern void X509_REVOKED_free(X509_REVOKED *a); extern X509_REVOKED *d2i_X509_REVOKED(X509_REVOKED **a, const unsigned char **in, long len); extern int i2d_X509_REVOKED(const X509_REVOKED *a, unsigned char **out); extern const ASN1_ITEM * X509_REVOKED_it(void);
13609 extern X509_CRL_INFO *X509_CRL_INFO_new(void); extern void X509_CRL_INFO_free(X509_CRL_INFO *a); extern X509_CRL_INFO *d2i_X509_CRL_INFO(X509_CRL_INFO **a, const unsigned char **in, long len); extern int i2d_X509_CRL_INFO(const X509_CRL_INFO *a, unsigned char **out); extern const ASN1_ITEM * X509_CRL_INFO_it(void);
13610 extern X509_CRL *X509_CRL_new(void); extern void X509_CRL_free(X509_CRL *a); extern X509_CRL *d2i_X509_CRL(X509_CRL **a, const unsigned char **in, long len); extern int i2d_X509_CRL(const X509_CRL *a, unsigned char **out); extern const ASN1_ITEM * X509_CRL_it(void);
13611 X509_CRL *X509_CRL_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
13612
13613 int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
13614 int X509_CRL_get0_by_serial(X509_CRL *crl,
13615 X509_REVOKED **ret, const ASN1_INTEGER *serial);
13616 int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
13617
13618 X509_PKEY *X509_PKEY_new(void);
13619 void X509_PKEY_free(X509_PKEY *a);
13620
13621 extern NETSCAPE_SPKI *NETSCAPE_SPKI_new(void); extern void NETSCAPE_SPKI_free(NETSCAPE_SPKI *a); extern NETSCAPE_SPKI *d2i_NETSCAPE_SPKI(NETSCAPE_SPKI **a, const unsigned char **in, long len); extern int i2d_NETSCAPE_SPKI(const NETSCAPE_SPKI *a, unsigned char **out); extern const ASN1_ITEM * NETSCAPE_SPKI_it(void);
13622 extern NETSCAPE_SPKAC *NETSCAPE_SPKAC_new(void); extern void NETSCAPE_SPKAC_free(NETSCAPE_SPKAC *a); extern NETSCAPE_SPKAC *d2i_NETSCAPE_SPKAC(NETSCAPE_SPKAC **a, const unsigned char **in, long len); extern int i2d_NETSCAPE_SPKAC(const NETSCAPE_SPKAC *a, unsigned char **out); extern const ASN1_ITEM * NETSCAPE_SPKAC_it(void);
13623 extern NETSCAPE_CERT_SEQUENCE *NETSCAPE_CERT_SEQUENCE_new(void); extern void NETSCAPE_CERT_SEQUENCE_free(NETSCAPE_CERT_SEQUENCE *a); extern NETSCAPE_CERT_SEQUENCE *d2i_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE **a, const unsigned char **in, long len); extern int i2d_NETSCAPE_CERT_SEQUENCE(const NETSCAPE_CERT_SEQUENCE *a, unsigned char **out); extern const ASN1_ITEM * NETSCAPE_CERT_SEQUENCE_it(void);
13624
13625 X509_INFO *X509_INFO_new(void);
13626 void X509_INFO_free(X509_INFO *a);
13627 char *X509_NAME_oneline(const X509_NAME *a, char *buf, int size);
13628
13629
13630 __attribute__((deprecated("Since OpenSSL " "3.0")))
13631 int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1,
13632 ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey);
13633 __attribute__((deprecated("Since OpenSSL " "3.0")))
13634 int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
13635 unsigned char *md, unsigned int *len);
13636 __attribute__((deprecated("Since OpenSSL " "3.0")))
13637 int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, X509_ALGOR *algor2,
13638 ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey,
13639 const EVP_MD *type);
13640
13641 int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data,
13642 unsigned char *md, unsigned int *len);
13643 int ASN1_item_verify(const ASN1_ITEM *it, const X509_ALGOR *alg,
13644 const ASN1_BIT_STRING *signature, const void *data,
13645 EVP_PKEY *pkey);
13646 int ASN1_item_verify_ctx(const ASN1_ITEM *it, const X509_ALGOR *alg,
13647 const ASN1_BIT_STRING *signature, const void *data,
13648 EVP_MD_CTX *ctx);
13649 int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
13650 ASN1_BIT_STRING *signature, const void *data,
13651 EVP_PKEY *pkey, const EVP_MD *md);
13652 int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
13653 X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
13654 const void *data, EVP_MD_CTX *ctx);
13655
13656
13657
13658
13659
13660 long X509_get_version(const X509 *x);
13661 int X509_set_version(X509 *x, long version);
13662 int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
13663 ASN1_INTEGER *X509_get_serialNumber(X509 *x);
13664 const ASN1_INTEGER *X509_get0_serialNumber(const X509 *x);
13665 int X509_set_issuer_name(X509 *x, const X509_NAME *name);
13666 X509_NAME *X509_get_issuer_name(const X509 *a);
13667 int X509_set_subject_name(X509 *x, const X509_NAME *name);
13668 X509_NAME *X509_get_subject_name(const X509 *a);
13669 const ASN1_TIME * X509_get0_notBefore(const X509 *x);
13670 ASN1_TIME *X509_getm_notBefore(const X509 *x);
13671 int X509_set1_notBefore(X509 *x, const ASN1_TIME *tm);
13672 const ASN1_TIME *X509_get0_notAfter(const X509 *x);
13673 ASN1_TIME *X509_getm_notAfter(const X509 *x);
13674 int X509_set1_notAfter(X509 *x, const ASN1_TIME *tm);
13675 int X509_set_pubkey(X509 *x, EVP_PKEY *pkey);
13676 int X509_up_ref(X509 *x);
13677 int X509_get_signature_type(const X509 *x);
13678 # 870 "include/openssl/x509.h"
13679 X509_PUBKEY *X509_get_X509_PUBKEY(const X509 *x);
13680 const struct stack_st_X509_EXTENSION *X509_get0_extensions(const X509 *x);
13681 void X509_get0_uids(const X509 *x, const ASN1_BIT_STRING **piuid,
13682 const ASN1_BIT_STRING **psuid);
13683 const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x);
13684
13685 EVP_PKEY *X509_get0_pubkey(const X509 *x);
13686 EVP_PKEY *X509_get_pubkey(X509 *x);
13687 ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x);
13688
13689
13690
13691 long X509_REQ_get_version(const X509_REQ *req);
13692 int X509_REQ_set_version(X509_REQ *x, long version);
13693 X509_NAME *X509_REQ_get_subject_name(const X509_REQ *req);
13694 int X509_REQ_set_subject_name(X509_REQ *req, const X509_NAME *name);
13695 void X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig,
13696 const X509_ALGOR **palg);
13697 void X509_REQ_set0_signature(X509_REQ *req, ASN1_BIT_STRING *psig);
13698 int X509_REQ_set1_signature_algo(X509_REQ *req, X509_ALGOR *palg);
13699 int X509_REQ_get_signature_nid(const X509_REQ *req);
13700 int i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp);
13701 int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
13702 EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
13703 EVP_PKEY *X509_REQ_get0_pubkey(const X509_REQ *req);
13704 X509_PUBKEY *X509_REQ_get_X509_PUBKEY(X509_REQ *req);
13705 int X509_REQ_extension_nid(int nid);
13706 int *X509_REQ_get_extension_nids(void);
13707 void X509_REQ_set_extension_nids(int *nids);
13708 struct stack_st_X509_EXTENSION *X509_REQ_get_extensions(X509_REQ *req);
13709 int X509_REQ_add_extensions_nid(X509_REQ *req,
13710 const struct stack_st_X509_EXTENSION *exts, int nid);
13711 int X509_REQ_add_extensions(X509_REQ *req, const struct stack_st_X509_EXTENSION *ext);
13712 int X509_REQ_get_attr_count(const X509_REQ *req);
13713 int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos);
13714 int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, const ASN1_OBJECT *obj,
13715 int lastpos);
13716 X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
13717 X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
13718 int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
13719 int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
13720 const ASN1_OBJECT *obj, int type,
13721 const unsigned char *bytes, int len);
13722 int X509_REQ_add1_attr_by_NID(X509_REQ *req,
13723 int nid, int type,
13724 const unsigned char *bytes, int len);
13725 int X509_REQ_add1_attr_by_txt(X509_REQ *req,
13726 const char *attrname, int type,
13727 const unsigned char *bytes, int len);
13728
13729
13730
13731
13732 int X509_CRL_set_version(X509_CRL *x, long version);
13733 int X509_CRL_set_issuer_name(X509_CRL *x, const X509_NAME *name);
13734 int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
13735 int X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
13736 int X509_CRL_sort(X509_CRL *crl);
13737 int X509_CRL_up_ref(X509_CRL *crl);
13738
13739
13740
13741
13742
13743
13744 long X509_CRL_get_version(const X509_CRL *crl);
13745 const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *crl);
13746 const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl);
13747
13748 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *crl);
13749 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl);
13750
13751 X509_NAME *X509_CRL_get_issuer(const X509_CRL *crl);
13752 const struct stack_st_X509_EXTENSION *X509_CRL_get0_extensions(const X509_CRL *crl);
13753 struct stack_st_X509_REVOKED *X509_CRL_get_REVOKED(X509_CRL *crl);
13754 void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
13755 const X509_ALGOR **palg);
13756 int X509_CRL_get_signature_nid(const X509_CRL *crl);
13757 int i2d_re_X509_CRL_tbs(X509_CRL *req, unsigned char **pp);
13758
13759 const ASN1_INTEGER *X509_REVOKED_get0_serialNumber(const X509_REVOKED *x);
13760 int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
13761 const ASN1_TIME *X509_REVOKED_get0_revocationDate(const X509_REVOKED *x);
13762 int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
13763 const struct stack_st_X509_EXTENSION *
13764 X509_REVOKED_get0_extensions(const X509_REVOKED *r);
13765
13766 X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer,
13767 EVP_PKEY *skey, const EVP_MD *md, unsigned int flags);
13768
13769 int X509_REQ_check_private_key(const X509_REQ *req, EVP_PKEY *pkey);
13770
13771 int X509_check_private_key(const X509 *cert, const EVP_PKEY *pkey);
13772 int X509_chain_check_suiteb(int *perror_depth,
13773 X509 *x, struct stack_st_X509 *chain,
13774 unsigned long flags);
13775 int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags);
13776 void OSSL_STACK_OF_X509_free(struct stack_st_X509 *certs);
13777 struct stack_st_X509 *X509_chain_up_ref(struct stack_st_X509 *chain);
13778
13779 int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);
13780 unsigned long X509_issuer_and_serial_hash(X509 *a);
13781
13782 int X509_issuer_name_cmp(const X509 *a, const X509 *b);
13783 unsigned long X509_issuer_name_hash(X509 *a);
13784
13785 int X509_subject_name_cmp(const X509 *a, const X509 *b);
13786 unsigned long X509_subject_name_hash(X509 *x);
13787
13788
13789 unsigned long X509_issuer_name_hash_old(X509 *a);
13790 unsigned long X509_subject_name_hash_old(X509 *x);
13791
13792
13793
13794
13795
13796
13797
13798 int X509_add_cert(struct stack_st_X509 *sk, X509 *cert, int flags);
13799 int X509_add_certs(struct stack_st_X509 *sk, struct stack_st_X509 *certs, int flags);
13800
13801 int X509_cmp(const X509 *a, const X509 *b);
13802 int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
13803
13804
13805 __attribute__((deprecated("Since OpenSSL " "3.0"))) int X509_certificate_type(const X509 *x,
13806 const EVP_PKEY *pubkey);
13807
13808 unsigned long X509_NAME_hash_ex(const X509_NAME *x, OSSL_LIB_CTX *libctx,
13809 const char *propq, int *ok);
13810 unsigned long X509_NAME_hash_old(const X509_NAME *x);
13811
13812 int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
13813 int X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
13814 int X509_aux_print(BIO *out, X509 *x, int indent);
13815
13816 int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,
13817 unsigned long cflag);
13818 int X509_print_fp(FILE *bp, X509 *x);
13819 int X509_CRL_print_fp(FILE *bp, X509_CRL *x);
13820 int X509_REQ_print_fp(FILE *bp, X509_REQ *req);
13821 int X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent,
13822 unsigned long flags);
13823
13824
13825 int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase);
13826 int X509_NAME_print_ex(BIO *out, const X509_NAME *nm, int indent,
13827 unsigned long flags);
13828 int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,
13829 unsigned long cflag);
13830 int X509_print(BIO *bp, X509 *x);
13831 int X509_ocspid_print(BIO *bp, X509 *x);
13832 int X509_CRL_print_ex(BIO *out, X509_CRL *x, unsigned long nmflag);
13833 int X509_CRL_print(BIO *bp, X509_CRL *x);
13834 int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
13835 unsigned long cflag);
13836 int X509_REQ_print(BIO *bp, X509_REQ *req);
13837
13838 int X509_NAME_entry_count(const X509_NAME *name);
13839 int X509_NAME_get_text_by_NID(const X509_NAME *name, int nid,
13840 char *buf, int len);
13841 int X509_NAME_get_text_by_OBJ(const X509_NAME *name, const ASN1_OBJECT *obj,
13842 char *buf, int len);
13843
13844
13845
13846
13847
13848 int X509_NAME_get_index_by_NID(const X509_NAME *name, int nid, int lastpos);
13849 int X509_NAME_get_index_by_OBJ(const X509_NAME *name, const ASN1_OBJECT *obj,
13850 int lastpos);
13851 X509_NAME_ENTRY *X509_NAME_get_entry(const X509_NAME *name, int loc);
13852 X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
13853 int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne,
13854 int loc, int set);
13855 int X509_NAME_add_entry_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, int type,
13856 const unsigned char *bytes, int len, int loc,
13857 int set);
13858 int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
13859 const unsigned char *bytes, int len, int loc,
13860 int set);
13861 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
13862 const char *field, int type,
13863 const unsigned char *bytes,
13864 int len);
13865 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
13866 int type,
13867 const unsigned char *bytes,
13868 int len);
13869 int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
13870 const unsigned char *bytes, int len, int loc,
13871 int set);
13872 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
13873 const ASN1_OBJECT *obj, int type,
13874 const unsigned char *bytes,
13875 int len);
13876 int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, const ASN1_OBJECT *obj);
13877 int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
13878 const unsigned char *bytes, int len);
13879 ASN1_OBJECT *X509_NAME_ENTRY_get_object(const X509_NAME_ENTRY *ne);
13880 ASN1_STRING * X509_NAME_ENTRY_get_data(const X509_NAME_ENTRY *ne);
13881 int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne);
13882
13883 int X509_NAME_get0_der(const X509_NAME *nm, const unsigned char **pder,
13884 size_t *pderlen);
13885
13886 int X509v3_get_ext_count(const struct stack_st_X509_EXTENSION *x);
13887 int X509v3_get_ext_by_NID(const struct stack_st_X509_EXTENSION *x,
13888 int nid, int lastpos);
13889 int X509v3_get_ext_by_OBJ(const struct stack_st_X509_EXTENSION *x,
13890 const ASN1_OBJECT *obj, int lastpos);
13891 int X509v3_get_ext_by_critical(const struct stack_st_X509_EXTENSION *x,
13892 int crit, int lastpos);
13893 X509_EXTENSION *X509v3_get_ext(const struct stack_st_X509_EXTENSION *x, int loc);
13894 X509_EXTENSION *X509v3_delete_ext(struct stack_st_X509_EXTENSION *x, int loc);
13895 struct stack_st_X509_EXTENSION *X509v3_add_ext(struct stack_st_X509_EXTENSION **x,
13896 X509_EXTENSION *ex, int loc);
13897
13898 int X509_get_ext_count(const X509 *x);
13899 int X509_get_ext_by_NID(const X509 *x, int nid, int lastpos);
13900 int X509_get_ext_by_OBJ(const X509 *x, const ASN1_OBJECT *obj, int lastpos);
13901 int X509_get_ext_by_critical(const X509 *x, int crit, int lastpos);
13902 X509_EXTENSION *X509_get_ext(const X509 *x, int loc);
13903 X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
13904 int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
13905 void *X509_get_ext_d2i(const X509 *x, int nid, int *crit, int *idx);
13906 int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,
13907 unsigned long flags);
13908
13909 int X509_CRL_get_ext_count(const X509_CRL *x);
13910 int X509_CRL_get_ext_by_NID(const X509_CRL *x, int nid, int lastpos);
13911 int X509_CRL_get_ext_by_OBJ(const X509_CRL *x, const ASN1_OBJECT *obj,
13912 int lastpos);
13913 int X509_CRL_get_ext_by_critical(const X509_CRL *x, int crit, int lastpos);
13914 X509_EXTENSION *X509_CRL_get_ext(const X509_CRL *x, int loc);
13915 X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
13916 int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
13917 void *X509_CRL_get_ext_d2i(const X509_CRL *x, int nid, int *crit, int *idx);
13918 int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,
13919 unsigned long flags);
13920
13921 int X509_REVOKED_get_ext_count(const X509_REVOKED *x);
13922 int X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos);
13923 int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, const ASN1_OBJECT *obj,
13924 int lastpos);
13925 int X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, int crit,
13926 int lastpos);
13927 X509_EXTENSION *X509_REVOKED_get_ext(const X509_REVOKED *x, int loc);
13928 X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);
13929 int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
13930 void *X509_REVOKED_get_ext_d2i(const X509_REVOKED *x, int nid, int *crit,
13931 int *idx);
13932 int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,
13933 unsigned long flags);
13934
13935 X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
13936 int nid, int crit,
13937 ASN1_OCTET_STRING *data);
13938 X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
13939 const ASN1_OBJECT *obj, int crit,
13940 ASN1_OCTET_STRING *data);
13941 int X509_EXTENSION_set_object(X509_EXTENSION *ex, const ASN1_OBJECT *obj);
13942 int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
13943 int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);
13944 ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);
13945 ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);
13946 int X509_EXTENSION_get_critical(const X509_EXTENSION *ex);
13947
13948 int X509at_get_attr_count(const struct stack_st_X509_ATTRIBUTE *x);
13949 int X509at_get_attr_by_NID(const struct stack_st_X509_ATTRIBUTE *x, int nid,
13950 int lastpos);
13951 int X509at_get_attr_by_OBJ(const struct stack_st_X509_ATTRIBUTE *sk,
13952 const ASN1_OBJECT *obj, int lastpos);
13953 X509_ATTRIBUTE *X509at_get_attr(const struct stack_st_X509_ATTRIBUTE *x, int loc);
13954 X509_ATTRIBUTE *X509at_delete_attr(struct stack_st_X509_ATTRIBUTE *x, int loc);
13955 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr(struct stack_st_X509_ATTRIBUTE **x,
13956 X509_ATTRIBUTE *attr);
13957 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_OBJ(struct stack_st_X509_ATTRIBUTE
13958 **x, const ASN1_OBJECT *obj,
13959 int type,
13960 const unsigned char *bytes,
13961 int len);
13962 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_NID(struct stack_st_X509_ATTRIBUTE
13963 **x, int nid, int type,
13964 const unsigned char *bytes,
13965 int len);
13966 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_txt(struct stack_st_X509_ATTRIBUTE
13967 **x, const char *attrname,
13968 int type,
13969 const unsigned char *bytes,
13970 int len);
13971 void *X509at_get0_data_by_OBJ(const struct stack_st_X509_ATTRIBUTE *x,
13972 const ASN1_OBJECT *obj, int lastpos, int type);
13973 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
13974 int atrtype, const void *data,
13975 int len);
13976 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
13977 const ASN1_OBJECT *obj,
13978 int atrtype, const void *data,
13979 int len);
13980 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,
13981 const char *atrname, int type,
13982 const unsigned char *bytes,
13983 int len);
13984 int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj);
13985 int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype,
13986 const void *data, int len);
13987 void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype,
13988 void *data);
13989 int X509_ATTRIBUTE_count(const X509_ATTRIBUTE *attr);
13990 ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
13991 ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
13992
13993 int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
13994 int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos);
13995 int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj,
13996 int lastpos);
13997 X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
13998 X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);
13999 int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);
14000 int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,
14001 const ASN1_OBJECT *obj, int type,
14002 const unsigned char *bytes, int len);
14003 int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,
14004 int nid, int type,
14005 const unsigned char *bytes, int len);
14006 int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
14007 const char *attrname, int type,
14008 const unsigned char *bytes, int len);
14009
14010
14011 X509 *X509_find_by_issuer_and_serial(struct stack_st_X509 *sk, const X509_NAME *name,
14012 const ASN1_INTEGER *serial);
14013 X509 *X509_find_by_subject(struct stack_st_X509 *sk, const X509_NAME *name);
14014
14015 extern PBEPARAM *PBEPARAM_new(void); extern void PBEPARAM_free(PBEPARAM *a); extern PBEPARAM *d2i_PBEPARAM(PBEPARAM **a, const unsigned char **in, long len); extern int i2d_PBEPARAM(const PBEPARAM *a, unsigned char **out); extern const ASN1_ITEM * PBEPARAM_it(void);
14016 extern PBE2PARAM *PBE2PARAM_new(void); extern void PBE2PARAM_free(PBE2PARAM *a); extern PBE2PARAM *d2i_PBE2PARAM(PBE2PARAM **a, const unsigned char **in, long len); extern int i2d_PBE2PARAM(const PBE2PARAM *a, unsigned char **out); extern const ASN1_ITEM * PBE2PARAM_it(void);
14017 extern PBKDF2PARAM *PBKDF2PARAM_new(void); extern void PBKDF2PARAM_free(PBKDF2PARAM *a); extern PBKDF2PARAM *d2i_PBKDF2PARAM(PBKDF2PARAM **a, const unsigned char **in, long len); extern int i2d_PBKDF2PARAM(const PBKDF2PARAM *a, unsigned char **out); extern const ASN1_ITEM * PBKDF2PARAM_it(void);
14018
14019 extern SCRYPT_PARAMS *SCRYPT_PARAMS_new(void); extern void SCRYPT_PARAMS_free(SCRYPT_PARAMS *a); extern SCRYPT_PARAMS *d2i_SCRYPT_PARAMS(SCRYPT_PARAMS **a, const unsigned char **in, long len); extern int i2d_SCRYPT_PARAMS(const SCRYPT_PARAMS *a, unsigned char **out); extern const ASN1_ITEM * SCRYPT_PARAMS_it(void);
14020
14021
14022 int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
14023 const unsigned char *salt, int saltlen);
14024 int PKCS5_pbe_set0_algor_ex(X509_ALGOR *algor, int alg, int iter,
14025 const unsigned char *salt, int saltlen,
14026 OSSL_LIB_CTX *libctx);
14027
14028 X509_ALGOR *PKCS5_pbe_set(int alg, int iter,
14029 const unsigned char *salt, int saltlen);
14030 X509_ALGOR *PKCS5_pbe_set_ex(int alg, int iter,
14031 const unsigned char *salt, int saltlen,
14032 OSSL_LIB_CTX *libctx);
14033
14034 X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
14035 unsigned char *salt, int saltlen);
14036 X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
14037 unsigned char *salt, int saltlen,
14038 unsigned char *aiv, int prf_nid);
14039 X509_ALGOR *PKCS5_pbe2_set_iv_ex(const EVP_CIPHER *cipher, int iter,
14040 unsigned char *salt, int saltlen,
14041 unsigned char *aiv, int prf_nid,
14042 OSSL_LIB_CTX *libctx);
14043
14044
14045 X509_ALGOR *PKCS5_pbe2_set_scrypt(const EVP_CIPHER *cipher,
14046 const unsigned char *salt, int saltlen,
14047 unsigned char *aiv, uint64_t N, uint64_t r,
14048 uint64_t p);
14049
14050
14051 X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
14052 int prf_nid, int keylen);
14053 X509_ALGOR *PKCS5_pbkdf2_set_ex(int iter, unsigned char *salt, int saltlen,
14054 int prf_nid, int keylen,
14055 OSSL_LIB_CTX *libctx);
14056
14057
14058
14059 extern PKCS8_PRIV_KEY_INFO *PKCS8_PRIV_KEY_INFO_new(void); extern void PKCS8_PRIV_KEY_INFO_free(PKCS8_PRIV_KEY_INFO *a); extern PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO **a, const unsigned char **in, long len); extern int i2d_PKCS8_PRIV_KEY_INFO(const PKCS8_PRIV_KEY_INFO *a, unsigned char **out); extern const ASN1_ITEM * PKCS8_PRIV_KEY_INFO_it(void);
14060
14061 EVP_PKEY *EVP_PKCS82PKEY(const PKCS8_PRIV_KEY_INFO *p8);
14062 EVP_PKEY *EVP_PKCS82PKEY_ex(const PKCS8_PRIV_KEY_INFO *p8, OSSL_LIB_CTX *libctx,
14063 const char *propq);
14064 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(const EVP_PKEY *pkey);
14065
14066 int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj,
14067 int version, int ptype, void *pval,
14068 unsigned char *penc, int penclen);
14069 int PKCS8_pkey_get0(const ASN1_OBJECT **ppkalg,
14070 const unsigned char **pk, int *ppklen,
14071 const X509_ALGOR **pa, const PKCS8_PRIV_KEY_INFO *p8);
14072
14073 const struct stack_st_X509_ATTRIBUTE *
14074 PKCS8_pkey_get0_attrs(const PKCS8_PRIV_KEY_INFO *p8);
14075 int PKCS8_pkey_add1_attr(PKCS8_PRIV_KEY_INFO *p8, X509_ATTRIBUTE *attr);
14076 int PKCS8_pkey_add1_attr_by_NID(PKCS8_PRIV_KEY_INFO *p8, int nid, int type,
14077 const unsigned char *bytes, int len);
14078 int PKCS8_pkey_add1_attr_by_OBJ(PKCS8_PRIV_KEY_INFO *p8, const ASN1_OBJECT *obj,
14079 int type, const unsigned char *bytes, int len);
14080
14081
14082 void X509_PUBKEY_set0_public_key(X509_PUBKEY *pub,
14083 unsigned char *penc, int penclen);
14084 int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,
14085 int ptype, void *pval,
14086 unsigned char *penc, int penclen);
14087 int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,
14088 const unsigned char **pk, int *ppklen,
14089 X509_ALGOR **pa, const X509_PUBKEY *pub);
14090 int X509_PUBKEY_eq(const X509_PUBKEY *a, const X509_PUBKEY *b);
14091 # 33 "include/openssl/ssl.h" 2
14092
14093
14094
14095
14096 # 1 "include/openssl/pem.h" 1
14097 # 12 "include/openssl/pem.h"
14098
14099 # 24 "include/openssl/pem.h"
14100 # 1 "include/openssl/pemerr.h" 1
14101 # 13 "include/openssl/pemerr.h"
14102
14103 # 25 "include/openssl/pem.h" 2
14104 # 373 "include/openssl/pem.h"
14105 int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher);
14106 int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *len,
14107 pem_password_cb *callback, void *u);
14108
14109 int PEM_read_bio(BIO *bp, char **name, char **header,
14110 unsigned char **data, long *len);
14111
14112
14113
14114 int PEM_read_bio_ex(BIO *bp, char **name, char **header,
14115 unsigned char **data, long *len, unsigned int flags);
14116 int PEM_bytes_read_bio_secmem(unsigned char **pdata, long *plen, char **pnm,
14117 const char *name, BIO *bp, pem_password_cb *cb,
14118 void *u);
14119 int PEM_write_bio(BIO *bp, const char *name, const char *hdr,
14120 const unsigned char *data, long len);
14121 int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm,
14122 const char *name, BIO *bp, pem_password_cb *cb,
14123 void *u);
14124 void *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x,
14125 pem_password_cb *cb, void *u);
14126 int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp,
14127 const void *x, const EVP_CIPHER *enc,
14128 const unsigned char *kstr, int klen,
14129 pem_password_cb *cb, void *u);
14130
14131 struct stack_st_X509_INFO *PEM_X509_INFO_read_bio(BIO *bp, struct stack_st_X509_INFO *sk,
14132 pem_password_cb *cb, void *u);
14133 struct stack_st_X509_INFO
14134 *PEM_X509_INFO_read_bio_ex(BIO *bp, struct stack_st_X509_INFO *sk,
14135 pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx,
14136 const char *propq);
14137
14138 int PEM_X509_INFO_write_bio(BIO *bp, const X509_INFO *xi, EVP_CIPHER *enc,
14139 const unsigned char *kstr, int klen,
14140 pem_password_cb *cd, void *u);
14141
14142
14143 int PEM_read(FILE *fp, char **name, char **header,
14144 unsigned char **data, long *len);
14145 int PEM_write(FILE *fp, const char *name, const char *hdr,
14146 const unsigned char *data, long len);
14147 void *PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x,
14148 pem_password_cb *cb, void *u);
14149 int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp,
14150 const void *x, const EVP_CIPHER *enc,
14151 const unsigned char *kstr, int klen,
14152 pem_password_cb *callback, void *u);
14153 struct stack_st_X509_INFO *PEM_X509_INFO_read(FILE *fp, struct stack_st_X509_INFO *sk,
14154 pem_password_cb *cb, void *u);
14155 struct stack_st_X509_INFO
14156 *PEM_X509_INFO_read_ex(FILE *fp, struct stack_st_X509_INFO *sk, pem_password_cb *cb,
14157 void *u, OSSL_LIB_CTX *libctx, const char *propq);
14158
14159
14160 int PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type);
14161 int PEM_SignUpdate(EVP_MD_CTX *ctx, const unsigned char *d, unsigned int cnt);
14162 int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
14163 unsigned int *siglen, EVP_PKEY *pkey);
14164
14165
14166 int PEM_def_callback(char *buf, int num, int rwflag, void *userdata);
14167 void PEM_proc_type(char *buf, int type);
14168 void PEM_dek_info(char *buf, const char *type, int len, const char *str);
14169
14170
14171
14172 extern X509 *PEM_read_bio_X509(BIO *out, X509 **x, pem_password_cb *cb, void *u); extern X509 *PEM_read_X509(FILE *out, X509 **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_X509(BIO *out, const X509 *x); extern int PEM_write_X509(FILE *out, const X509 *x);
14173 extern X509 *PEM_read_bio_X509_AUX(BIO *out, X509 **x, pem_password_cb *cb, void *u); extern X509 *PEM_read_X509_AUX(FILE *out, X509 **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_X509_AUX(BIO *out, const X509 *x); extern int PEM_write_X509_AUX(FILE *out, const X509 *x);
14174 extern X509_REQ *PEM_read_bio_X509_REQ(BIO *out, X509_REQ **x, pem_password_cb *cb, void *u); extern X509_REQ *PEM_read_X509_REQ(FILE *out, X509_REQ **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_X509_REQ(BIO *out, const X509_REQ *x); extern int PEM_write_X509_REQ(FILE *out, const X509_REQ *x);
14175 extern int PEM_write_bio_X509_REQ_NEW(BIO *out, const X509_REQ *x); extern int PEM_write_X509_REQ_NEW(FILE *out, const X509_REQ *x);
14176 extern X509_CRL *PEM_read_bio_X509_CRL(BIO *out, X509_CRL **x, pem_password_cb *cb, void *u); extern X509_CRL *PEM_read_X509_CRL(FILE *out, X509_CRL **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_X509_CRL(BIO *out, const X509_CRL *x); extern int PEM_write_X509_CRL(FILE *out, const X509_CRL *x);
14177 extern X509_PUBKEY *PEM_read_bio_X509_PUBKEY(BIO *out, X509_PUBKEY **x, pem_password_cb *cb, void *u); extern X509_PUBKEY *PEM_read_X509_PUBKEY(FILE *out, X509_PUBKEY **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_X509_PUBKEY(BIO *out, const X509_PUBKEY *x); extern int PEM_write_X509_PUBKEY(FILE *out, const X509_PUBKEY *x);
14178 extern PKCS7 *PEM_read_bio_PKCS7(BIO *out, PKCS7 **x, pem_password_cb *cb, void *u); extern PKCS7 *PEM_read_PKCS7(FILE *out, PKCS7 **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_PKCS7(BIO *out, const PKCS7 *x); extern int PEM_write_PKCS7(FILE *out, const PKCS7 *x);
14179 extern NETSCAPE_CERT_SEQUENCE *PEM_read_bio_NETSCAPE_CERT_SEQUENCE(BIO *out, NETSCAPE_CERT_SEQUENCE **x, pem_password_cb *cb, void *u); extern NETSCAPE_CERT_SEQUENCE *PEM_read_NETSCAPE_CERT_SEQUENCE(FILE *out, NETSCAPE_CERT_SEQUENCE **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_NETSCAPE_CERT_SEQUENCE(BIO *out, const NETSCAPE_CERT_SEQUENCE *x); extern int PEM_write_NETSCAPE_CERT_SEQUENCE(FILE *out, const NETSCAPE_CERT_SEQUENCE *x);
14180 extern X509_SIG *PEM_read_bio_PKCS8(BIO *out, X509_SIG **x, pem_password_cb *cb, void *u); extern X509_SIG *PEM_read_PKCS8(FILE *out, X509_SIG **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_PKCS8(BIO *out, const X509_SIG *x); extern int PEM_write_PKCS8(FILE *out, const X509_SIG *x);
14181 extern PKCS8_PRIV_KEY_INFO *PEM_read_bio_PKCS8_PRIV_KEY_INFO(BIO *out, PKCS8_PRIV_KEY_INFO **x, pem_password_cb *cb, void *u); extern PKCS8_PRIV_KEY_INFO *PEM_read_PKCS8_PRIV_KEY_INFO(FILE *out, PKCS8_PRIV_KEY_INFO **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_PKCS8_PRIV_KEY_INFO(BIO *out, const PKCS8_PRIV_KEY_INFO *x); extern int PEM_write_PKCS8_PRIV_KEY_INFO(FILE *out, const PKCS8_PRIV_KEY_INFO *x);
14182
14183 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *PEM_read_bio_RSAPrivateKey(BIO *out, RSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *PEM_read_RSAPrivateKey(FILE *out, RSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_RSAPrivateKey(BIO *out, const RSA *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_RSAPrivateKey(FILE *out, const RSA *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u);
14184 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *PEM_read_bio_RSAPublicKey(BIO *out, RSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *PEM_read_RSAPublicKey(FILE *out, RSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_RSAPublicKey(BIO *out, const RSA *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_RSAPublicKey(FILE *out, const RSA *x);
14185 __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *PEM_read_bio_RSA_PUBKEY(BIO *out, RSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *PEM_read_RSA_PUBKEY(FILE *out, RSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_RSA_PUBKEY(BIO *out, const RSA *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_RSA_PUBKEY(FILE *out, const RSA *x);
14186
14187
14188
14189 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *PEM_read_bio_DSAPrivateKey(BIO *out, DSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *PEM_read_DSAPrivateKey(FILE *out, DSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_DSAPrivateKey(BIO *out, const DSA *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_DSAPrivateKey(FILE *out, const DSA *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u);
14190 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *PEM_read_bio_DSA_PUBKEY(BIO *out, DSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *PEM_read_DSA_PUBKEY(FILE *out, DSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_DSA_PUBKEY(BIO *out, const DSA *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_DSA_PUBKEY(FILE *out, const DSA *x);
14191 __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *PEM_read_bio_DSAparams(BIO *out, DSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *PEM_read_DSAparams(FILE *out, DSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_DSAparams(BIO *out, const DSA *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_DSAparams(FILE *out, const DSA *x);
14192
14193
14194
14195
14196
14197 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_GROUP *PEM_read_bio_ECPKParameters(BIO *out, EC_GROUP **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_GROUP *PEM_read_ECPKParameters(FILE *out, EC_GROUP **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_ECPKParameters(BIO *out, const EC_GROUP *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_ECPKParameters(FILE *out, const EC_GROUP *x);
14198 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *PEM_read_bio_ECPrivateKey(BIO *out, EC_KEY **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *PEM_read_ECPrivateKey(FILE *out, EC_KEY **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_ECPrivateKey(BIO *out, const EC_KEY *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_ECPrivateKey(FILE *out, const EC_KEY *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u);
14199 __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *PEM_read_bio_EC_PUBKEY(BIO *out, EC_KEY **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *PEM_read_EC_PUBKEY(FILE *out, EC_KEY **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_EC_PUBKEY(BIO *out, const EC_KEY *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_EC_PUBKEY(FILE *out, const EC_KEY *x);
14200
14201
14202
14203
14204
14205 __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *PEM_read_bio_DHparams(BIO *out, DH **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *PEM_read_DHparams(FILE *out, DH **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_DHparams(BIO *out, const DH *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_DHparams(FILE *out, const DH *x);
14206 __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_DHxparams(BIO *out, const DH *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_DHxparams(FILE *out, const DH *x);
14207
14208
14209 extern EVP_PKEY *PEM_read_bio_PrivateKey(BIO *out, EVP_PKEY **x, pem_password_cb *cb, void *u); extern EVP_PKEY *PEM_read_bio_PrivateKey_ex(BIO *out, EVP_PKEY **x, pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx, const char *propq); extern EVP_PKEY *PEM_read_PrivateKey(FILE *out, EVP_PKEY **x, pem_password_cb *cb, void *u); extern EVP_PKEY *PEM_read_PrivateKey_ex(FILE *out, EVP_PKEY **x, pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx, const char *propq); extern int PEM_write_bio_PrivateKey(BIO *out, const EVP_PKEY *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u); extern int PEM_write_bio_PrivateKey_ex(BIO *out, const EVP_PKEY *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx, const char *propq); extern int PEM_write_PrivateKey(FILE *out, const EVP_PKEY *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u); extern int PEM_write_PrivateKey_ex(FILE *out, const EVP_PKEY *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx, const char *propq);
14210 extern EVP_PKEY *PEM_read_bio_PUBKEY(BIO *out, EVP_PKEY **x, pem_password_cb *cb, void *u); extern EVP_PKEY *PEM_read_bio_PUBKEY_ex(BIO *out, EVP_PKEY **x, pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx, const char *propq); extern EVP_PKEY *PEM_read_PUBKEY(FILE *out, EVP_PKEY **x, pem_password_cb *cb, void *u); extern EVP_PKEY *PEM_read_PUBKEY_ex(FILE *out, EVP_PKEY **x, pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx, const char *propq); extern int PEM_write_bio_PUBKEY(BIO *out, const EVP_PKEY *x); extern int PEM_write_bio_PUBKEY_ex(BIO *out, const EVP_PKEY *x, OSSL_LIB_CTX *libctx, const char *propq); extern int PEM_write_PUBKEY(FILE *out, const EVP_PKEY *x); extern int PEM_write_PUBKEY_ex(FILE *out, const EVP_PKEY *x, OSSL_LIB_CTX *libctx, const char *propq);
14211
14212 int PEM_write_bio_PrivateKey_traditional(BIO *bp, const EVP_PKEY *x,
14213 const EVP_CIPHER *enc,
14214 const unsigned char *kstr, int klen,
14215 pem_password_cb *cb, void *u);
14216
14217
14218 int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, const EVP_PKEY *x, int nid,
14219 const char *kstr, int klen,
14220 pem_password_cb *cb, void *u);
14221 int PEM_write_bio_PKCS8PrivateKey(BIO *, const EVP_PKEY *, const EVP_CIPHER *,
14222 const char *kstr, int klen,
14223 pem_password_cb *cb, void *u);
14224 int i2d_PKCS8PrivateKey_bio(BIO *bp, const EVP_PKEY *x, const EVP_CIPHER *enc,
14225 const char *kstr, int klen,
14226 pem_password_cb *cb, void *u);
14227 int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, const EVP_PKEY *x, int nid,
14228 const char *kstr, int klen,
14229 pem_password_cb *cb, void *u);
14230 EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
14231 void *u);
14232
14233
14234 int i2d_PKCS8PrivateKey_fp(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc,
14235 const char *kstr, int klen,
14236 pem_password_cb *cb, void *u);
14237 int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, const EVP_PKEY *x, int nid,
14238 const char *kstr, int klen,
14239 pem_password_cb *cb, void *u);
14240 int PEM_write_PKCS8PrivateKey_nid(FILE *fp, const EVP_PKEY *x, int nid,
14241 const char *kstr, int klen,
14242 pem_password_cb *cb, void *u);
14243
14244 EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb,
14245 void *u);
14246
14247 int PEM_write_PKCS8PrivateKey(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc,
14248 const char *kstr, int klen,
14249 pem_password_cb *cd, void *u);
14250
14251 EVP_PKEY *PEM_read_bio_Parameters_ex(BIO *bp, EVP_PKEY **x,
14252 OSSL_LIB_CTX *libctx, const char *propq);
14253 EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x);
14254 int PEM_write_bio_Parameters(BIO *bp, const EVP_PKEY *x);
14255
14256 EVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length);
14257 EVP_PKEY *b2i_PublicKey(const unsigned char **in, long length);
14258 EVP_PKEY *b2i_PrivateKey_bio(BIO *in);
14259 EVP_PKEY *b2i_PublicKey_bio(BIO *in);
14260 int i2b_PrivateKey_bio(BIO *out, const EVP_PKEY *pk);
14261 int i2b_PublicKey_bio(BIO *out, const EVP_PKEY *pk);
14262 EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u);
14263 EVP_PKEY *b2i_PVK_bio_ex(BIO *in, pem_password_cb *cb, void *u,
14264 OSSL_LIB_CTX *libctx, const char *propq);
14265 int i2b_PVK_bio(BIO *out, const EVP_PKEY *pk, int enclevel,
14266 pem_password_cb *cb, void *u);
14267 int i2b_PVK_bio_ex(BIO *out, const EVP_PKEY *pk, int enclevel,
14268 pem_password_cb *cb, void *u,
14269 OSSL_LIB_CTX *libctx, const char *propq);
14270 # 38 "include/openssl/ssl.h" 2
14271 # 1 "include/openssl/hmac.h" 1
14272 # 12 "include/openssl/hmac.h"
14273
14274 # 32 "include/openssl/hmac.h"
14275 __attribute__((deprecated("Since OpenSSL " "3.0"))) size_t HMAC_size(const HMAC_CTX *e);
14276 __attribute__((deprecated("Since OpenSSL " "3.0"))) HMAC_CTX *HMAC_CTX_new(void);
14277 __attribute__((deprecated("Since OpenSSL " "3.0"))) int HMAC_CTX_reset(HMAC_CTX *ctx);
14278 __attribute__((deprecated("Since OpenSSL " "3.0"))) void HMAC_CTX_free(HMAC_CTX *ctx);
14279
14280
14281 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) int HMAC_Init(HMAC_CTX *ctx,
14282 const void *key, int len,
14283 const EVP_MD *md);
14284
14285
14286 __attribute__((deprecated("Since OpenSSL " "3.0"))) int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
14287 const EVP_MD *md, ENGINE *impl);
14288 __attribute__((deprecated("Since OpenSSL " "3.0"))) int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
14289 size_t len);
14290 __attribute__((deprecated("Since OpenSSL " "3.0"))) int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
14291 unsigned int *len);
14292 __attribute__((deprecated("Since OpenSSL " "3.0"))) int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
14293 __attribute__((deprecated("Since OpenSSL " "3.0"))) void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
14294 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx);
14295
14296
14297 unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
14298 const unsigned char *data, size_t data_len,
14299 unsigned char *md, unsigned int *md_len);
14300 # 39 "include/openssl/ssl.h" 2
14301 # 1 "include/openssl/async.h" 1
14302 # 14 "include/openssl/async.h"
14303
14304 # 31 "include/openssl/async.h"
14305 # 1 "include/openssl/asyncerr.h" 1
14306 # 13 "include/openssl/asyncerr.h"
14307
14308 # 32 "include/openssl/async.h" 2
14309
14310
14311
14312
14313
14314
14315 typedef struct async_job_st ASYNC_JOB;
14316 typedef struct async_wait_ctx_st ASYNC_WAIT_CTX;
14317 typedef int (*ASYNC_callback_fn)(void *arg);
14318 # 52 "include/openssl/async.h"
14319 int ASYNC_init_thread(size_t max_size, size_t init_size);
14320 void ASYNC_cleanup_thread(void);
14321
14322
14323 ASYNC_WAIT_CTX *ASYNC_WAIT_CTX_new(void);
14324 void ASYNC_WAIT_CTX_free(ASYNC_WAIT_CTX *ctx);
14325 int ASYNC_WAIT_CTX_set_wait_fd(ASYNC_WAIT_CTX *ctx, const void *key,
14326 int fd,
14327 void *custom_data,
14328 void (*cleanup)(ASYNC_WAIT_CTX *, const void *,
14329 int, void *));
14330 int ASYNC_WAIT_CTX_get_fd(ASYNC_WAIT_CTX *ctx, const void *key,
14331 int *fd, void **custom_data);
14332 int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, int *fd,
14333 size_t *numfds);
14334 int ASYNC_WAIT_CTX_get_callback(ASYNC_WAIT_CTX *ctx,
14335 ASYNC_callback_fn *callback,
14336 void **callback_arg);
14337 int ASYNC_WAIT_CTX_set_callback(ASYNC_WAIT_CTX *ctx,
14338 ASYNC_callback_fn callback,
14339 void *callback_arg);
14340 int ASYNC_WAIT_CTX_set_status(ASYNC_WAIT_CTX *ctx, int status);
14341 int ASYNC_WAIT_CTX_get_status(ASYNC_WAIT_CTX *ctx);
14342 int ASYNC_WAIT_CTX_get_changed_fds(ASYNC_WAIT_CTX *ctx, int *addfd,
14343 size_t *numaddfds, int *delfd,
14344 size_t *numdelfds);
14345 int ASYNC_WAIT_CTX_clear_fd(ASYNC_WAIT_CTX *ctx, const void *key);
14346
14347
14348 int ASYNC_is_capable(void);
14349
14350 typedef void *(*ASYNC_stack_alloc_fn)(size_t *num);
14351 typedef void (*ASYNC_stack_free_fn)(void *addr);
14352
14353 int ASYNC_set_mem_functions(ASYNC_stack_alloc_fn alloc_fn,
14354 ASYNC_stack_free_fn free_fn);
14355 void ASYNC_get_mem_functions(ASYNC_stack_alloc_fn *alloc_fn,
14356 ASYNC_stack_free_fn *free_fn);
14357
14358 int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *ctx, int *ret,
14359 int (*func)(void *), void *args, size_t size);
14360 int ASYNC_pause_job(void);
14361
14362 ASYNC_JOB *ASYNC_get_current_job(void);
14363 ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job);
14364 void ASYNC_block_pause(void);
14365 void ASYNC_unblock_pause(void);
14366 # 40 "include/openssl/ssl.h" 2
14367
14368
14369
14370 # 1 "include/openssl/ct.h" 1
14371 # 17 "include/openssl/ct.h"
14372
14373 # 27 "include/openssl/ct.h"
14374 # 1 "include/openssl/types.h" 1
14375 # 28 "include/openssl/ct.h" 2
14376
14377
14378 # 1 "include/openssl/cterr.h" 1
14379 # 13 "include/openssl/cterr.h"
14380
14381 # 31 "include/openssl/ct.h" 2
14382 # 42 "include/openssl/ct.h"
14383 struct stack_st_SCT; typedef int (*sk_SCT_compfunc)(const SCT * const *a, const SCT *const *b); typedef void (*sk_SCT_freefunc)(SCT *a); typedef SCT * (*sk_SCT_copyfunc)(const SCT *a); static __attribute__((unused)) inline SCT *ossl_check_SCT_type(SCT *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_SCT_sk_type(const struct stack_st_SCT *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_SCT_sk_type(struct stack_st_SCT *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_SCT_compfunc_type(sk_SCT_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_SCT_copyfunc_type(sk_SCT_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_SCT_freefunc_type(sk_SCT_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
14384 # 68 "include/openssl/ct.h"
14385 struct stack_st_CTLOG; typedef int (*sk_CTLOG_compfunc)(const CTLOG * const *a, const CTLOG *const *b); typedef void (*sk_CTLOG_freefunc)(CTLOG *a); typedef CTLOG * (*sk_CTLOG_copyfunc)(const CTLOG *a); static __attribute__((unused)) inline CTLOG *ossl_check_CTLOG_type(CTLOG *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_CTLOG_sk_type(const struct stack_st_CTLOG *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_CTLOG_sk_type(struct stack_st_CTLOG *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_CTLOG_compfunc_type(sk_CTLOG_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_CTLOG_copyfunc_type(sk_CTLOG_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_CTLOG_freefunc_type(sk_CTLOG_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
14386 # 97 "include/openssl/ct.h"
14387 typedef enum {
14388 CT_LOG_ENTRY_TYPE_NOT_SET = -1,
14389 CT_LOG_ENTRY_TYPE_X509 = 0,
14390 CT_LOG_ENTRY_TYPE_PRECERT = 1
14391 } ct_log_entry_type_t;
14392
14393 typedef enum {
14394 SCT_VERSION_NOT_SET = -1,
14395 SCT_VERSION_V1 = 0
14396 } sct_version_t;
14397
14398 typedef enum {
14399 SCT_SOURCE_UNKNOWN,
14400 SCT_SOURCE_TLS_EXTENSION,
14401 SCT_SOURCE_X509V3_EXTENSION,
14402 SCT_SOURCE_OCSP_STAPLED_RESPONSE
14403 } sct_source_t;
14404
14405 typedef enum {
14406 SCT_VALIDATION_STATUS_NOT_SET,
14407 SCT_VALIDATION_STATUS_UNKNOWN_LOG,
14408 SCT_VALIDATION_STATUS_VALID,
14409 SCT_VALIDATION_STATUS_INVALID,
14410 SCT_VALIDATION_STATUS_UNVERIFIED,
14411 SCT_VALIDATION_STATUS_UNKNOWN_VERSION
14412 } sct_validation_status_t;
14413 # 134 "include/openssl/ct.h"
14414 CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new_ex(OSSL_LIB_CTX *libctx,
14415 const char *propq);
14416
14417
14418
14419
14420
14421 CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void);
14422
14423
14424 void CT_POLICY_EVAL_CTX_free(CT_POLICY_EVAL_CTX *ctx);
14425
14426
14427 X509* CT_POLICY_EVAL_CTX_get0_cert(const CT_POLICY_EVAL_CTX *ctx);
14428
14429
14430
14431
14432
14433
14434 int CT_POLICY_EVAL_CTX_set1_cert(CT_POLICY_EVAL_CTX *ctx, X509 *cert);
14435
14436
14437 X509* CT_POLICY_EVAL_CTX_get0_issuer(const CT_POLICY_EVAL_CTX *ctx);
14438
14439
14440
14441
14442
14443
14444 int CT_POLICY_EVAL_CTX_set1_issuer(CT_POLICY_EVAL_CTX *ctx, X509 *issuer);
14445
14446
14447 const CTLOG_STORE *CT_POLICY_EVAL_CTX_get0_log_store(const CT_POLICY_EVAL_CTX *ctx);
14448
14449
14450 void CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(CT_POLICY_EVAL_CTX *ctx,
14451 CTLOG_STORE *log_store);
14452
14453
14454
14455
14456
14457
14458 uint64_t CT_POLICY_EVAL_CTX_get_time(const CT_POLICY_EVAL_CTX *ctx);
14459
14460
14461
14462
14463
14464
14465
14466 void CT_POLICY_EVAL_CTX_set_time(CT_POLICY_EVAL_CTX *ctx, uint64_t time_in_ms);
14467 # 196 "include/openssl/ct.h"
14468 SCT *SCT_new(void);
14469
14470
14471
14472
14473
14474 SCT *SCT_new_from_base64(unsigned char version,
14475 const char *logid_base64,
14476 ct_log_entry_type_t entry_type,
14477 uint64_t timestamp,
14478 const char *extensions_base64,
14479 const char *signature_base64);
14480
14481
14482
14483
14484 void SCT_free(SCT *sct);
14485
14486
14487
14488
14489
14490 void SCT_LIST_free(struct stack_st_SCT *a);
14491
14492
14493
14494
14495 sct_version_t SCT_get_version(const SCT *sct);
14496
14497
14498
14499
14500
14501 int SCT_set_version(SCT *sct, sct_version_t version);
14502
14503
14504
14505
14506 ct_log_entry_type_t SCT_get_log_entry_type(const SCT *sct);
14507
14508
14509
14510
14511
14512 int SCT_set_log_entry_type(SCT *sct, ct_log_entry_type_t entry_type);
14513
14514
14515
14516
14517
14518
14519 size_t SCT_get0_log_id(const SCT *sct, unsigned char **log_id);
14520
14521
14522
14523
14524
14525
14526 int SCT_set0_log_id(SCT *sct, unsigned char *log_id, size_t log_id_len);
14527
14528
14529
14530
14531
14532
14533 int SCT_set1_log_id(SCT *sct, const unsigned char *log_id,
14534 size_t log_id_len);
14535
14536
14537
14538
14539 uint64_t SCT_get_timestamp(const SCT *sct);
14540
14541
14542
14543
14544 void SCT_set_timestamp(SCT *sct, uint64_t timestamp);
14545
14546
14547
14548
14549
14550
14551 int SCT_get_signature_nid(const SCT *sct);
14552
14553
14554
14555
14556
14557
14558
14559 int SCT_set_signature_nid(SCT *sct, int nid);
14560
14561
14562
14563
14564
14565
14566 size_t SCT_get0_extensions(const SCT *sct, unsigned char **ext);
14567
14568
14569
14570
14571
14572 void SCT_set0_extensions(SCT *sct, unsigned char *ext, size_t ext_len);
14573
14574
14575
14576
14577
14578
14579 int SCT_set1_extensions(SCT *sct, const unsigned char *ext,
14580 size_t ext_len);
14581
14582
14583
14584
14585
14586
14587 size_t SCT_get0_signature(const SCT *sct, unsigned char **sig);
14588
14589
14590
14591
14592
14593 void SCT_set0_signature(SCT *sct, unsigned char *sig, size_t sig_len);
14594
14595
14596
14597
14598
14599 int SCT_set1_signature(SCT *sct, const unsigned char *sig,
14600 size_t sig_len);
14601
14602
14603
14604
14605 sct_source_t SCT_get_source(const SCT *sct);
14606
14607
14608
14609
14610
14611 int SCT_set_source(SCT *sct, sct_source_t source);
14612
14613
14614
14615
14616 const char *SCT_validation_status_string(const SCT *sct);
14617
14618
14619
14620
14621
14622
14623
14624 void SCT_print(const SCT *sct, BIO *out, int indent, const CTLOG_STORE *logs);
14625 # 361 "include/openssl/ct.h"
14626 void SCT_LIST_print(const struct stack_st_SCT *sct_list, BIO *out, int indent,
14627 const char *separator, const CTLOG_STORE *logs);
14628
14629
14630
14631
14632
14633 sct_validation_status_t SCT_get_validation_status(const SCT *sct);
14634 # 377 "include/openssl/ct.h"
14635 int SCT_validate(SCT *sct, const CT_POLICY_EVAL_CTX *ctx);
14636 # 386 "include/openssl/ct.h"
14637 int SCT_LIST_validate(const struct stack_st_SCT *scts,
14638 CT_POLICY_EVAL_CTX *ctx);
14639 # 406 "include/openssl/ct.h"
14640 int i2o_SCT_LIST(const struct stack_st_SCT *a, unsigned char **pp);
14641 # 418 "include/openssl/ct.h"
14642 struct stack_st_SCT *o2i_SCT_LIST(struct stack_st_SCT **a, const unsigned char **pp,
14643 size_t len);
14644 # 433 "include/openssl/ct.h"
14645 int i2d_SCT_LIST(const struct stack_st_SCT *a, unsigned char **pp);
14646 # 445 "include/openssl/ct.h"
14647 struct stack_st_SCT *d2i_SCT_LIST(struct stack_st_SCT **a, const unsigned char **pp,
14648 long len);
14649 # 457 "include/openssl/ct.h"
14650 int i2o_SCT(const SCT *sct, unsigned char **out);
14651 # 470 "include/openssl/ct.h"
14652 SCT *o2i_SCT(SCT **psct, const unsigned char **in, size_t len);
14653 # 484 "include/openssl/ct.h"
14654 CTLOG *CTLOG_new_ex(EVP_PKEY *public_key, const char *name, OSSL_LIB_CTX *libctx,
14655 const char *propq);
14656
14657
14658
14659
14660
14661 CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name);
14662 # 501 "include/openssl/ct.h"
14663 int CTLOG_new_from_base64_ex(CTLOG **ct_log, const char *pkey_base64,
14664 const char *name, OSSL_LIB_CTX *libctx,
14665 const char *propq);
14666
14667
14668
14669
14670
14671
14672 int CTLOG_new_from_base64(CTLOG ** ct_log,
14673 const char *pkey_base64, const char *name);
14674
14675
14676
14677
14678 void CTLOG_free(CTLOG *log);
14679
14680
14681 const char *CTLOG_get0_name(const CTLOG *log);
14682
14683 void CTLOG_get0_log_id(const CTLOG *log, const uint8_t **log_id,
14684 size_t *log_id_len);
14685
14686 EVP_PKEY *CTLOG_get0_public_key(const CTLOG *log);
14687 # 535 "include/openssl/ct.h"
14688 CTLOG_STORE *CTLOG_STORE_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
14689
14690
14691
14692
14693
14694
14695 CTLOG_STORE *CTLOG_STORE_new(void);
14696
14697
14698
14699
14700 void CTLOG_STORE_free(CTLOG_STORE *store);
14701
14702
14703
14704
14705
14706 const CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store,
14707 const uint8_t *log_id,
14708 size_t log_id_len);
14709
14710
14711
14712
14713
14714 int CTLOG_STORE_load_file(CTLOG_STORE *store, const char *file);
14715
14716
14717
14718
14719
14720 int CTLOG_STORE_load_default_file(CTLOG_STORE *store);
14721 # 44 "include/openssl/ssl.h" 2
14722 # 1 "include/openssl/sslerr.h" 1
14723 # 13 "include/openssl/sslerr.h"
14724
14725
14726
14727
14728 # 1 "include/openssl/sslerr_legacy.h" 1
14729 # 19 "include/openssl/sslerr_legacy.h"
14730
14731 # 29 "include/openssl/sslerr_legacy.h"
14732 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_SSL_strings(void);
14733 # 18 "include/openssl/sslerr.h" 2
14734 # 45 "include/openssl/ssl.h" 2
14735 # 1 "include/openssl/prov_ssl.h" 1
14736 # 12 "include/openssl/prov_ssl.h"
14737
14738 # 46 "include/openssl/ssl.h" 2
14739 # 231 "include/openssl/ssl.h"
14740 typedef struct ssl_st *ssl_crock_st;
14741 typedef struct tls_session_ticket_ext_st TLS_SESSION_TICKET_EXT;
14742 typedef struct ssl_method_st SSL_METHOD;
14743 typedef struct ssl_cipher_st SSL_CIPHER;
14744 typedef struct ssl_session_st SSL_SESSION;
14745 typedef struct tls_sigalgs_st TLS_SIGALGS;
14746 typedef struct ssl_conf_ctx_st SSL_CONF_CTX;
14747 typedef struct ssl_comp_st SSL_COMP;
14748
14749 struct stack_st_SSL_CIPHER;
14750 struct stack_st_SSL_COMP;
14751
14752
14753 typedef struct srtp_protection_profile_st {
14754 const char *name;
14755 unsigned long id;
14756 } SRTP_PROTECTION_PROFILE;
14757 struct stack_st_SRTP_PROTECTION_PROFILE; typedef int (*sk_SRTP_PROTECTION_PROFILE_compfunc)(const SRTP_PROTECTION_PROFILE * const *a, const SRTP_PROTECTION_PROFILE *const *b); typedef void (*sk_SRTP_PROTECTION_PROFILE_freefunc)(SRTP_PROTECTION_PROFILE *a); typedef SRTP_PROTECTION_PROFILE * (*sk_SRTP_PROTECTION_PROFILE_copyfunc)(const SRTP_PROTECTION_PROFILE *a); static __attribute__((unused)) inline SRTP_PROTECTION_PROFILE *ossl_check_SRTP_PROTECTION_PROFILE_type(SRTP_PROTECTION_PROFILE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_SRTP_PROTECTION_PROFILE_sk_type(const struct stack_st_SRTP_PROTECTION_PROFILE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_SRTP_PROTECTION_PROFILE_sk_type(struct stack_st_SRTP_PROTECTION_PROFILE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_SRTP_PROTECTION_PROFILE_compfunc_type(sk_SRTP_PROTECTION_PROFILE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_SRTP_PROTECTION_PROFILE_copyfunc_type(sk_SRTP_PROTECTION_PROFILE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_SRTP_PROTECTION_PROFILE_freefunc_type(sk_SRTP_PROTECTION_PROFILE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
14758 # 277 "include/openssl/ssl.h"
14759 typedef int (*tls_session_ticket_ext_cb_fn)(SSL *s, const unsigned char *data,
14760 int len, void *arg);
14761 typedef int (*tls_session_secret_cb_fn)(SSL *s, void *secret, int *secret_len,
14762 struct stack_st_SSL_CIPHER *peer_ciphers,
14763 const SSL_CIPHER **cipher, void *arg);
14764 # 313 "include/openssl/ssl.h"
14765 typedef int (*custom_ext_add_cb)(SSL *s, unsigned int ext_type,
14766 const unsigned char **out, size_t *outlen,
14767 int *al, void *add_arg);
14768
14769 typedef void (*custom_ext_free_cb)(SSL *s, unsigned int ext_type,
14770 const unsigned char *out, void *add_arg);
14771
14772 typedef int (*custom_ext_parse_cb)(SSL *s, unsigned int ext_type,
14773 const unsigned char *in, size_t inlen,
14774 int *al, void *parse_arg);
14775
14776
14777 typedef int (*SSL_custom_ext_add_cb_ex)(SSL *s, unsigned int ext_type,
14778 unsigned int context,
14779 const unsigned char **out,
14780 size_t *outlen, X509 *x,
14781 size_t chainidx,
14782 int *al, void *add_arg);
14783
14784 typedef void (*SSL_custom_ext_free_cb_ex)(SSL *s, unsigned int ext_type,
14785 unsigned int context,
14786 const unsigned char *out,
14787 void *add_arg);
14788
14789 typedef int (*SSL_custom_ext_parse_cb_ex)(SSL *s, unsigned int ext_type,
14790 unsigned int context,
14791 const unsigned char *in,
14792 size_t inlen, X509 *x,
14793 size_t chainidx,
14794 int *al, void *parse_arg);
14795
14796
14797 typedef int (*SSL_verify_cb)(int preverify_ok, X509_STORE_CTX *x509_ctx);
14798
14799
14800 typedef int (*SSL_async_callback_fn)(SSL *s, void *arg);
14801 # 623 "include/openssl/ssl.h"
14802 uint64_t SSL_CTX_get_options(const SSL_CTX *ctx);
14803 uint64_t SSL_get_options(const SSL *s);
14804 uint64_t SSL_CTX_clear_options(SSL_CTX *ctx, uint64_t op);
14805 uint64_t SSL_clear_options(SSL *s, uint64_t op);
14806 uint64_t SSL_CTX_set_options(SSL_CTX *ctx, uint64_t op);
14807 uint64_t SSL_set_options(SSL *s, uint64_t op);
14808 # 661 "include/openssl/ssl.h"
14809 void SSL_CTX_set_msg_callback(SSL_CTX *ctx,
14810 void (*cb) (int write_p, int version,
14811 int content_type, const void *buf,
14812 size_t len, SSL *ssl, void *arg));
14813 void SSL_set_msg_callback(SSL *ssl,
14814 void (*cb) (int write_p, int version,
14815 int content_type, const void *buf,
14816 size_t len, SSL *ssl, void *arg));
14817 # 678 "include/openssl/ssl.h"
14818 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_SRP_CTX_init(SSL *s);
14819 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_CTX_SRP_CTX_init(SSL_CTX *ctx);
14820 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_SRP_CTX_free(SSL *ctx);
14821 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_CTX_SRP_CTX_free(SSL_CTX *ctx);
14822 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_srp_server_param_with_username(SSL *s,
14823 int *ad);
14824 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SRP_Calc_A_param(SSL *s);
14825 # 705 "include/openssl/ssl.h"
14826 typedef int (*GEN_SESSION_CB) (SSL *ssl, unsigned char *id,
14827 unsigned int *id_len);
14828 # 720 "include/openssl/ssl.h"
14829 struct lhash_st_SSL_SESSION *SSL_CTX_sessions(SSL_CTX *ctx);
14830 # 746 "include/openssl/ssl.h"
14831 void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx,
14832 int (*new_session_cb) (struct ssl_st *ssl,
14833 SSL_SESSION *sess));
14834 int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx)) (struct ssl_st *ssl,
14835 SSL_SESSION *sess);
14836 void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx,
14837 void (*remove_session_cb) (struct ssl_ctx_st
14838 *ctx,
14839 SSL_SESSION *sess));
14840 void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx)) (struct ssl_ctx_st *ctx,
14841 SSL_SESSION *sess);
14842 void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx,
14843 SSL_SESSION *(*get_session_cb) (struct ssl_st
14844 *ssl,
14845 const unsigned char
14846 *data, int len,
14847 int *copy));
14848 SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx)) (struct ssl_st *ssl,
14849 const unsigned char *data,
14850 int len, int *copy);
14851 void SSL_CTX_set_info_callback(SSL_CTX *ctx,
14852 void (*cb) (const SSL *ssl, int type, int val));
14853 void (*SSL_CTX_get_info_callback(SSL_CTX *ctx)) (const SSL *ssl, int type,
14854 int val);
14855 void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx,
14856 int (*client_cert_cb) (SSL *ssl, X509 **x509,
14857 EVP_PKEY **pkey));
14858 int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx)) (SSL *ssl, X509 **x509,
14859 EVP_PKEY **pkey);
14860
14861 int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e);
14862
14863 void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx,
14864 int (*app_gen_cookie_cb) (SSL *ssl,
14865 unsigned char
14866 *cookie,
14867 unsigned int
14868 *cookie_len));
14869 void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx,
14870 int (*app_verify_cookie_cb) (SSL *ssl,
14871 const unsigned
14872 char *cookie,
14873 unsigned int
14874 cookie_len));
14875
14876 void SSL_CTX_set_stateless_cookie_generate_cb(
14877 SSL_CTX *ctx,
14878 int (*gen_stateless_cookie_cb) (SSL *ssl,
14879 unsigned char *cookie,
14880 size_t *cookie_len));
14881 void SSL_CTX_set_stateless_cookie_verify_cb(
14882 SSL_CTX *ctx,
14883 int (*verify_stateless_cookie_cb) (SSL *ssl,
14884 const unsigned char *cookie,
14885 size_t cookie_len));
14886
14887
14888 typedef int (*SSL_CTX_npn_advertised_cb_func)(SSL *ssl,
14889 const unsigned char **out,
14890 unsigned int *outlen,
14891 void *arg);
14892 void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *s,
14893 SSL_CTX_npn_advertised_cb_func cb,
14894 void *arg);
14895
14896
14897 typedef int (*SSL_CTX_npn_select_cb_func)(SSL *s,
14898 unsigned char **out,
14899 unsigned char *outlen,
14900 const unsigned char *in,
14901 unsigned int inlen,
14902 void *arg);
14903 void SSL_CTX_set_next_proto_select_cb(SSL_CTX *s,
14904 SSL_CTX_npn_select_cb_func cb,
14905 void *arg);
14906
14907
14908 void SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data,
14909 unsigned *len);
14910
14911
14912
14913 int SSL_select_next_proto(unsigned char **out, unsigned char *outlen,
14914 const unsigned char *in, unsigned int inlen,
14915 const unsigned char *client,
14916 unsigned int client_len);
14917
14918
14919
14920
14921
14922 int SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos,
14923 unsigned int protos_len);
14924 int SSL_set_alpn_protos(SSL *ssl, const unsigned char *protos,
14925 unsigned int protos_len);
14926 typedef int (*SSL_CTX_alpn_select_cb_func)(SSL *ssl,
14927 const unsigned char **out,
14928 unsigned char *outlen,
14929 const unsigned char *in,
14930 unsigned int inlen,
14931 void *arg);
14932 void SSL_CTX_set_alpn_select_cb(SSL_CTX *ctx,
14933 SSL_CTX_alpn_select_cb_func cb,
14934 void *arg);
14935 void SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data,
14936 unsigned int *len);
14937 # 860 "include/openssl/ssl.h"
14938 typedef unsigned int (*SSL_psk_client_cb_func)(SSL *ssl,
14939 const char *hint,
14940 char *identity,
14941 unsigned int max_identity_len,
14942 unsigned char *psk,
14943 unsigned int max_psk_len);
14944 void SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, SSL_psk_client_cb_func cb);
14945 void SSL_set_psk_client_callback(SSL *ssl, SSL_psk_client_cb_func cb);
14946
14947 typedef unsigned int (*SSL_psk_server_cb_func)(SSL *ssl,
14948 const char *identity,
14949 unsigned char *psk,
14950 unsigned int max_psk_len);
14951 void SSL_CTX_set_psk_server_callback(SSL_CTX *ctx, SSL_psk_server_cb_func cb);
14952 void SSL_set_psk_server_callback(SSL *ssl, SSL_psk_server_cb_func cb);
14953
14954 int SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *identity_hint);
14955 int SSL_use_psk_identity_hint(SSL *s, const char *identity_hint);
14956 const char *SSL_get_psk_identity_hint(const SSL *s);
14957 const char *SSL_get_psk_identity(const SSL *s);
14958
14959
14960 typedef int (*SSL_psk_find_session_cb_func)(SSL *ssl,
14961 const unsigned char *identity,
14962 size_t identity_len,
14963 SSL_SESSION **sess);
14964 typedef int (*SSL_psk_use_session_cb_func)(SSL *ssl, const EVP_MD *md,
14965 const unsigned char **id,
14966 size_t *idlen,
14967 SSL_SESSION **sess);
14968
14969 void SSL_set_psk_find_session_callback(SSL *s, SSL_psk_find_session_cb_func cb);
14970 void SSL_CTX_set_psk_find_session_callback(SSL_CTX *ctx,
14971 SSL_psk_find_session_cb_func cb);
14972 void SSL_set_psk_use_session_callback(SSL *s, SSL_psk_use_session_cb_func cb);
14973 void SSL_CTX_set_psk_use_session_callback(SSL_CTX *ctx,
14974 SSL_psk_use_session_cb_func cb);
14975
14976
14977
14978 int SSL_CTX_has_client_custom_ext(const SSL_CTX *ctx,
14979 unsigned int ext_type);
14980
14981 int SSL_CTX_add_client_custom_ext(SSL_CTX *ctx,
14982 unsigned int ext_type,
14983 custom_ext_add_cb add_cb,
14984 custom_ext_free_cb free_cb,
14985 void *add_arg,
14986 custom_ext_parse_cb parse_cb,
14987 void *parse_arg);
14988
14989 int SSL_CTX_add_server_custom_ext(SSL_CTX *ctx,
14990 unsigned int ext_type,
14991 custom_ext_add_cb add_cb,
14992 custom_ext_free_cb free_cb,
14993 void *add_arg,
14994 custom_ext_parse_cb parse_cb,
14995 void *parse_arg);
14996
14997 int SSL_CTX_add_custom_ext(SSL_CTX *ctx, unsigned int ext_type,
14998 unsigned int context,
14999 SSL_custom_ext_add_cb_ex add_cb,
15000 SSL_custom_ext_free_cb_ex free_cb,
15001 void *add_arg,
15002 SSL_custom_ext_parse_cb_ex parse_cb,
15003 void *parse_arg);
15004
15005 int SSL_extension_supported(unsigned int ext_type);
15006 # 957 "include/openssl/ssl.h"
15007 typedef void (*SSL_CTX_keylog_cb_func)(const SSL *ssl, const char *line);
15008
15009
15010
15011
15012
15013
15014 void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb);
15015
15016
15017
15018
15019
15020 SSL_CTX_keylog_cb_func SSL_CTX_get_keylog_callback(const SSL_CTX *ctx);
15021
15022 int SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data);
15023 uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx);
15024 int SSL_set_max_early_data(SSL *s, uint32_t max_early_data);
15025 uint32_t SSL_get_max_early_data(const SSL *s);
15026 int SSL_CTX_set_recv_max_early_data(SSL_CTX *ctx, uint32_t recv_max_early_data);
15027 uint32_t SSL_CTX_get_recv_max_early_data(const SSL_CTX *ctx);
15028 int SSL_set_recv_max_early_data(SSL *s, uint32_t recv_max_early_data);
15029 uint32_t SSL_get_recv_max_early_data(const SSL *s);
15030
15031
15032
15033
15034
15035 # 1 "include/openssl/ssl2.h" 1
15036 # 12 "include/openssl/ssl2.h"
15037
15038 # 986 "include/openssl/ssl.h" 2
15039 # 1 "include/openssl/ssl3.h" 1
15040 # 13 "include/openssl/ssl3.h"
15041
15042 # 987 "include/openssl/ssl.h" 2
15043 # 1 "include/openssl/tls1.h" 1
15044 # 14 "include/openssl/tls1.h"
15045
15046 # 244 "include/openssl/tls1.h"
15047 int SSL_CTX_set_tlsext_max_fragment_length(SSL_CTX *ctx, uint8_t mode);
15048 int SSL_set_tlsext_max_fragment_length(SSL *ssl, uint8_t mode);
15049
15050
15051
15052 const char *SSL_get_servername(const SSL *s, const int type);
15053 int SSL_get_servername_type(const SSL *s);
15054
15055
15056
15057
15058
15059
15060
15061 int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
15062 const char *label, size_t llen,
15063 const unsigned char *context,
15064 size_t contextlen, int use_context);
15065 # 270 "include/openssl/tls1.h"
15066 int SSL_export_keying_material_early(SSL *s, unsigned char *out,
15067 size_t olen, const char *label,
15068 size_t llen,
15069 const unsigned char *context,
15070 size_t contextlen);
15071
15072 int SSL_get_peer_signature_type_nid(const SSL *s, int *pnid);
15073 int SSL_get_signature_type_nid(const SSL *s, int *pnid);
15074
15075 int SSL_get_sigalgs(SSL *s, int idx,
15076 int *psign, int *phash, int *psignandhash,
15077 unsigned char *rsig, unsigned char *rhash);
15078
15079 int SSL_get_shared_sigalgs(SSL *s, int idx,
15080 int *psign, int *phash, int *psignandhash,
15081 unsigned char *rsig, unsigned char *rhash);
15082
15083 int SSL_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, struct stack_st_X509 *chain);
15084 # 363 "include/openssl/tls1.h"
15085 int SSL_CTX_set_tlsext_ticket_key_evp_cb
15086 (SSL_CTX *ctx, int (*fp)(SSL *, unsigned char *, unsigned char *,
15087 EVP_CIPHER_CTX *, EVP_MAC_CTX *, int));
15088 # 1202 "include/openssl/tls1.h"
15089 struct tls_session_ticket_ext_st {
15090 unsigned short length;
15091 void *data;
15092 };
15093 # 988 "include/openssl/ssl.h" 2
15094 # 1 "include/openssl/dtls1.h" 1
15095 # 12 "include/openssl/dtls1.h"
15096
15097 # 989 "include/openssl/ssl.h" 2
15098 # 1 "include/openssl/srtp.h" 1
15099 # 18 "include/openssl/srtp.h"
15100
15101 # 56 "include/openssl/srtp.h"
15102 int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles);
15103 int SSL_set_tlsext_use_srtp(SSL *ssl, const char *profiles);
15104
15105 struct stack_st_SRTP_PROTECTION_PROFILE *SSL_get_srtp_profiles(SSL *ssl);
15106 SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s);
15107 # 990 "include/openssl/ssl.h" 2
15108 # 1 "include/openssl/quic.h" 1
15109 # 12 "include/openssl/quic.h"
15110
15111 # 26 "include/openssl/quic.h"
15112 const SSL_METHOD *OSSL_QUIC_client_method(void);
15113
15114
15115
15116
15117 const SSL_METHOD *OSSL_QUIC_client_thread_method(void);
15118 # 991 "include/openssl/ssl.h" 2
15119 # 1000 "include/openssl/ssl.h"
15120 struct stack_st_SSL_CIPHER; typedef int (*sk_SSL_CIPHER_compfunc)(const SSL_CIPHER * const *a, const SSL_CIPHER *const *b); typedef void (*sk_SSL_CIPHER_freefunc)(SSL_CIPHER *a); typedef SSL_CIPHER * (*sk_SSL_CIPHER_copyfunc)(const SSL_CIPHER *a); static __attribute__((unused)) inline const SSL_CIPHER *ossl_check_SSL_CIPHER_type(const SSL_CIPHER *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_SSL_CIPHER_sk_type(const struct stack_st_SSL_CIPHER *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_SSL_CIPHER_sk_type(struct stack_st_SSL_CIPHER *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_SSL_CIPHER_compfunc_type(sk_SSL_CIPHER_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_SSL_CIPHER_copyfunc_type(sk_SSL_CIPHER_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_SSL_CIPHER_freefunc_type(sk_SSL_CIPHER_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
15121 # 1026 "include/openssl/ssl.h"
15122 struct stack_st_SSL_COMP; typedef int (*sk_SSL_COMP_compfunc)(const SSL_COMP * const *a, const SSL_COMP *const *b); typedef void (*sk_SSL_COMP_freefunc)(SSL_COMP *a); typedef SSL_COMP * (*sk_SSL_COMP_copyfunc)(const SSL_COMP *a); static __attribute__((unused)) inline SSL_COMP *ossl_check_SSL_COMP_type(SSL_COMP *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_SSL_COMP_sk_type(const struct stack_st_SSL_COMP *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_SSL_COMP_sk_type(struct stack_st_SSL_COMP *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_SSL_COMP_compfunc_type(sk_SSL_COMP_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_SSL_COMP_copyfunc_type(sk_SSL_COMP_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_SSL_COMP_freefunc_type(sk_SSL_COMP_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
15123 # 1064 "include/openssl/ssl.h"
15124 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) void SSL_set_debug(SSL *s, int debug);
15125 # 1086 "include/openssl/ssl.h"
15126 typedef enum {
15127 TLS_ST_BEFORE,
15128 TLS_ST_OK,
15129 DTLS_ST_CR_HELLO_VERIFY_REQUEST,
15130 TLS_ST_CR_SRVR_HELLO,
15131 TLS_ST_CR_CERT,
15132 TLS_ST_CR_COMP_CERT,
15133 TLS_ST_CR_CERT_STATUS,
15134 TLS_ST_CR_KEY_EXCH,
15135 TLS_ST_CR_CERT_REQ,
15136 TLS_ST_CR_SRVR_DONE,
15137 TLS_ST_CR_SESSION_TICKET,
15138 TLS_ST_CR_CHANGE,
15139 TLS_ST_CR_FINISHED,
15140 TLS_ST_CW_CLNT_HELLO,
15141 TLS_ST_CW_CERT,
15142 TLS_ST_CW_COMP_CERT,
15143 TLS_ST_CW_KEY_EXCH,
15144 TLS_ST_CW_CERT_VRFY,
15145 TLS_ST_CW_CHANGE,
15146 TLS_ST_CW_NEXT_PROTO,
15147 TLS_ST_CW_FINISHED,
15148 TLS_ST_SW_HELLO_REQ,
15149 TLS_ST_SR_CLNT_HELLO,
15150 DTLS_ST_SW_HELLO_VERIFY_REQUEST,
15151 TLS_ST_SW_SRVR_HELLO,
15152 TLS_ST_SW_CERT,
15153 TLS_ST_SW_COMP_CERT,
15154 TLS_ST_SW_KEY_EXCH,
15155 TLS_ST_SW_CERT_REQ,
15156 TLS_ST_SW_SRVR_DONE,
15157 TLS_ST_SR_CERT,
15158 TLS_ST_SR_COMP_CERT,
15159 TLS_ST_SR_KEY_EXCH,
15160 TLS_ST_SR_CERT_VRFY,
15161 TLS_ST_SR_NEXT_PROTO,
15162 TLS_ST_SR_CHANGE,
15163 TLS_ST_SR_FINISHED,
15164 TLS_ST_SW_SESSION_TICKET,
15165 TLS_ST_SW_CERT_STATUS,
15166 TLS_ST_SW_CHANGE,
15167 TLS_ST_SW_FINISHED,
15168 TLS_ST_SW_ENCRYPTED_EXTENSIONS,
15169 TLS_ST_CR_ENCRYPTED_EXTENSIONS,
15170 TLS_ST_CR_CERT_VRFY,
15171 TLS_ST_SW_CERT_VRFY,
15172 TLS_ST_CR_HELLO_REQ,
15173 TLS_ST_SW_KEY_UPDATE,
15174 TLS_ST_CW_KEY_UPDATE,
15175 TLS_ST_SR_KEY_UPDATE,
15176 TLS_ST_CR_KEY_UPDATE,
15177 TLS_ST_EARLY_DATA,
15178 TLS_ST_PENDING_EARLY_DATA_END,
15179 TLS_ST_CW_END_OF_EARLY_DATA,
15180 TLS_ST_SR_END_OF_EARLY_DATA
15181 } OSSL_HANDSHAKE_STATE;
15182 # 1173 "include/openssl/ssl.h"
15183 int SSL_in_init(const SSL *s);
15184 int SSL_in_before(const SSL *s);
15185 int SSL_is_init_finished(const SSL *s);
15186 # 1191 "include/openssl/ssl.h"
15187 size_t SSL_get_finished(const SSL *s, void *buf, size_t count);
15188 size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);
15189 # 1226 "include/openssl/ssl.h"
15190 extern SSL_SESSION *PEM_read_bio_SSL_SESSION(BIO *out, SSL_SESSION **x, pem_password_cb *cb, void *u); extern SSL_SESSION *PEM_read_SSL_SESSION(FILE *out, SSL_SESSION **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_SSL_SESSION(BIO *out, const SSL_SESSION *x); extern int PEM_write_SSL_SESSION(FILE *out, const SSL_SESSION *x);
15191 # 1582 "include/openssl/ssl.h"
15192 const char *SSL_get0_group_name(SSL *s);
15193 const char *SSL_group_to_name(SSL *s, int id);
15194
15195
15196
15197
15198
15199
15200
15201 int SSL_set0_tmp_dh_pkey(SSL *s, EVP_PKEY *dhpkey);
15202 int SSL_CTX_set0_tmp_dh_pkey(SSL_CTX *ctx, EVP_PKEY *dhpkey);
15203 # 1626 "include/openssl/ssl.h"
15204 const BIO_METHOD *BIO_f_ssl(void);
15205 BIO *BIO_new_ssl(SSL_CTX *ctx, int client);
15206 BIO *BIO_new_ssl_connect(SSL_CTX *ctx);
15207 BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx);
15208 int BIO_ssl_copy_session_id(BIO *to, BIO *from);
15209 void BIO_ssl_shutdown(BIO *ssl_bio);
15210
15211 int SSL_CTX_set_cipher_list(SSL_CTX *, const char *str);
15212 SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);
15213 SSL_CTX *SSL_CTX_new_ex(OSSL_LIB_CTX *libctx, const char *propq,
15214 const SSL_METHOD *meth);
15215 int SSL_CTX_up_ref(SSL_CTX *ctx);
15216 void SSL_CTX_free(SSL_CTX *);
15217 long SSL_CTX_set_timeout(SSL_CTX *ctx, long t);
15218 long SSL_CTX_get_timeout(const SSL_CTX *ctx);
15219 X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *);
15220 void SSL_CTX_set_cert_store(SSL_CTX *, X509_STORE *);
15221 void SSL_CTX_set1_cert_store(SSL_CTX *, X509_STORE *);
15222 int SSL_want(const SSL *s);
15223 int SSL_clear(SSL *s);
15224
15225 void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm);
15226
15227 const SSL_CIPHER *SSL_get_current_cipher(const SSL *s);
15228 const SSL_CIPHER *SSL_get_pending_cipher(const SSL *s);
15229 int SSL_CIPHER_get_bits(const SSL_CIPHER *c, int *alg_bits);
15230 const char *SSL_CIPHER_get_version(const SSL_CIPHER *c);
15231 const char *SSL_CIPHER_get_name(const SSL_CIPHER *c);
15232 const char *SSL_CIPHER_standard_name(const SSL_CIPHER *c);
15233 const char *OPENSSL_cipher_name(const char *rfc_name);
15234 uint32_t SSL_CIPHER_get_id(const SSL_CIPHER *c);
15235 uint16_t SSL_CIPHER_get_protocol_id(const SSL_CIPHER *c);
15236 int SSL_CIPHER_get_kx_nid(const SSL_CIPHER *c);
15237 int SSL_CIPHER_get_auth_nid(const SSL_CIPHER *c);
15238 const EVP_MD *SSL_CIPHER_get_handshake_digest(const SSL_CIPHER *c);
15239 int SSL_CIPHER_is_aead(const SSL_CIPHER *c);
15240
15241 int SSL_get_fd(const SSL *s);
15242 int SSL_get_rfd(const SSL *s);
15243 int SSL_get_wfd(const SSL *s);
15244 const char *SSL_get_cipher_list(const SSL *s, int n);
15245 char *SSL_get_shared_ciphers(const SSL *s, char *buf, int size);
15246 int SSL_get_read_ahead(const SSL *s);
15247 int SSL_pending(const SSL *s);
15248 int SSL_has_pending(const SSL *s);
15249
15250 int SSL_set_fd(SSL *s, int fd);
15251 int SSL_set_rfd(SSL *s, int fd);
15252 int SSL_set_wfd(SSL *s, int fd);
15253
15254 void SSL_set0_rbio(SSL *s, BIO *rbio);
15255 void SSL_set0_wbio(SSL *s, BIO *wbio);
15256 void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio);
15257 BIO *SSL_get_rbio(const SSL *s);
15258 BIO *SSL_get_wbio(const SSL *s);
15259 int SSL_set_cipher_list(SSL *s, const char *str);
15260 int SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str);
15261 int SSL_set_ciphersuites(SSL *s, const char *str);
15262 void SSL_set_read_ahead(SSL *s, int yes);
15263 int SSL_get_verify_mode(const SSL *s);
15264 int SSL_get_verify_depth(const SSL *s);
15265 SSL_verify_cb SSL_get_verify_callback(const SSL *s);
15266 void SSL_set_verify(SSL *s, int mode, SSL_verify_cb callback);
15267 void SSL_set_verify_depth(SSL *s, int depth);
15268 void SSL_set_cert_cb(SSL *s, int (*cb) (SSL *ssl, void *arg), void *arg);
15269
15270 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa);
15271 __attribute__((deprecated("Since OpenSSL " "3.0")))
15272 int SSL_use_RSAPrivateKey_ASN1(SSL *ssl,
15273 const unsigned char *d, long len);
15274
15275 int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey);
15276 int SSL_use_PrivateKey_ASN1(int pk, SSL *ssl, const unsigned char *d,
15277 long len);
15278 int SSL_use_certificate(SSL *ssl, X509 *x);
15279 int SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len);
15280 int SSL_use_cert_and_key(SSL *ssl, X509 *x509, EVP_PKEY *privatekey,
15281 struct stack_st_X509 *chain, int override);
15282
15283
15284
15285
15286
15287
15288
15289 int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
15290 size_t serverinfo_length);
15291 int SSL_CTX_use_serverinfo_ex(SSL_CTX *ctx, unsigned int version,
15292 const unsigned char *serverinfo,
15293 size_t serverinfo_length);
15294 int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file);
15295
15296
15297 __attribute__((deprecated("Since OpenSSL " "3.0")))
15298 int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type);
15299
15300
15301 int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type);
15302 int SSL_use_certificate_file(SSL *ssl, const char *file, int type);
15303
15304
15305 __attribute__((deprecated("Since OpenSSL " "3.0")))
15306 int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file,
15307 int type);
15308
15309 int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file,
15310 int type);
15311 int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file,
15312 int type);
15313
15314 int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file);
15315 int SSL_use_certificate_chain_file(SSL *ssl, const char *file);
15316 struct stack_st_X509_NAME *SSL_load_client_CA_file(const char *file);
15317 struct stack_st_X509_NAME
15318 *SSL_load_client_CA_file_ex(const char *file, OSSL_LIB_CTX *libctx,
15319 const char *propq);
15320 int SSL_add_file_cert_subjects_to_stack(struct stack_st_X509_NAME *stackCAs,
15321 const char *file);
15322 int SSL_add_dir_cert_subjects_to_stack(struct stack_st_X509_NAME *stackCAs,
15323 const char *dir);
15324 int SSL_add_store_cert_subjects_to_stack(struct stack_st_X509_NAME *stackCAs,
15325 const char *uri);
15326
15327
15328
15329
15330
15331
15332
15333 const char *SSL_state_string(const SSL *s);
15334 const char *SSL_rstate_string(const SSL *s);
15335 const char *SSL_state_string_long(const SSL *s);
15336 const char *SSL_rstate_string_long(const SSL *s);
15337 long SSL_SESSION_get_time(const SSL_SESSION *s);
15338 long SSL_SESSION_set_time(SSL_SESSION *s, long t);
15339 long SSL_SESSION_get_timeout(const SSL_SESSION *s);
15340 long SSL_SESSION_set_timeout(SSL_SESSION *s, long t);
15341 int SSL_SESSION_get_protocol_version(const SSL_SESSION *s);
15342 int SSL_SESSION_set_protocol_version(SSL_SESSION *s, int version);
15343
15344 time_t SSL_SESSION_get_time_ex(const SSL_SESSION *s);
15345 time_t SSL_SESSION_set_time_ex(SSL_SESSION *s, time_t t);
15346
15347 const char *SSL_SESSION_get0_hostname(const SSL_SESSION *s);
15348 int SSL_SESSION_set1_hostname(SSL_SESSION *s, const char *hostname);
15349 void SSL_SESSION_get0_alpn_selected(const SSL_SESSION *s,
15350 const unsigned char **alpn,
15351 size_t *len);
15352 int SSL_SESSION_set1_alpn_selected(SSL_SESSION *s,
15353 const unsigned char *alpn,
15354 size_t len);
15355 const SSL_CIPHER *SSL_SESSION_get0_cipher(const SSL_SESSION *s);
15356 int SSL_SESSION_set_cipher(SSL_SESSION *s, const SSL_CIPHER *cipher);
15357 int SSL_SESSION_has_ticket(const SSL_SESSION *s);
15358 unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s);
15359 void SSL_SESSION_get0_ticket(const SSL_SESSION *s, const unsigned char **tick,
15360 size_t *len);
15361 uint32_t SSL_SESSION_get_max_early_data(const SSL_SESSION *s);
15362 int SSL_SESSION_set_max_early_data(SSL_SESSION *s,
15363 uint32_t max_early_data);
15364 int SSL_copy_session_id(SSL *to, const SSL *from);
15365 X509 *SSL_SESSION_get0_peer(SSL_SESSION *s);
15366 int SSL_SESSION_set1_id_context(SSL_SESSION *s,
15367 const unsigned char *sid_ctx,
15368 unsigned int sid_ctx_len);
15369 int SSL_SESSION_set1_id(SSL_SESSION *s, const unsigned char *sid,
15370 unsigned int sid_len);
15371 int SSL_SESSION_is_resumable(const SSL_SESSION *s);
15372
15373 SSL_SESSION *SSL_SESSION_new(void);
15374 SSL_SESSION *SSL_SESSION_dup(const SSL_SESSION *src);
15375 const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s,
15376 unsigned int *len);
15377 const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *s,
15378 unsigned int *len);
15379 unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s);
15380
15381 int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses);
15382
15383 int SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses);
15384 int SSL_SESSION_print_keylog(BIO *bp, const SSL_SESSION *x);
15385 int SSL_SESSION_up_ref(SSL_SESSION *ses);
15386 void SSL_SESSION_free(SSL_SESSION *ses);
15387 int i2d_SSL_SESSION(const SSL_SESSION *in, unsigned char **pp);
15388 int SSL_set_session(SSL *to, SSL_SESSION *session);
15389 int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *session);
15390 int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *session);
15391 int SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb);
15392 int SSL_set_generate_session_id(SSL *s, GEN_SESSION_CB cb);
15393 int SSL_has_matching_session_id(const SSL *s,
15394 const unsigned char *id,
15395 unsigned int id_len);
15396 SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
15397 long length);
15398 SSL_SESSION *d2i_SSL_SESSION_ex(SSL_SESSION **a, const unsigned char **pp,
15399 long length, OSSL_LIB_CTX *libctx,
15400 const char *propq);
15401
15402
15403 X509 *SSL_get0_peer_certificate(const SSL *s);
15404 X509 *SSL_get1_peer_certificate(const SSL *s);
15405
15406
15407
15408
15409
15410
15411 struct stack_st_X509 *SSL_get_peer_cert_chain(const SSL *s);
15412
15413 int SSL_CTX_get_verify_mode(const SSL_CTX *ctx);
15414 int SSL_CTX_get_verify_depth(const SSL_CTX *ctx);
15415 SSL_verify_cb SSL_CTX_get_verify_callback(const SSL_CTX *ctx);
15416 void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, SSL_verify_cb callback);
15417 void SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth);
15418 void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx,
15419 int (*cb) (X509_STORE_CTX *, void *),
15420 void *arg);
15421 void SSL_CTX_set_cert_cb(SSL_CTX *c, int (*cb) (SSL *ssl, void *arg),
15422 void *arg);
15423
15424 __attribute__((deprecated("Since OpenSSL " "3.0")))
15425 int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa);
15426 __attribute__((deprecated("Since OpenSSL " "3.0")))
15427 int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d,
15428 long len);
15429
15430 int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey);
15431 int SSL_CTX_use_PrivateKey_ASN1(int pk, SSL_CTX *ctx,
15432 const unsigned char *d, long len);
15433 int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x);
15434 int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len,
15435 const unsigned char *d);
15436 int SSL_CTX_use_cert_and_key(SSL_CTX *ctx, X509 *x509, EVP_PKEY *privatekey,
15437 struct stack_st_X509 *chain, int override);
15438
15439 void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb);
15440 void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u);
15441 pem_password_cb *SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx);
15442 void *SSL_CTX_get_default_passwd_cb_userdata(SSL_CTX *ctx);
15443 void SSL_set_default_passwd_cb(SSL *s, pem_password_cb *cb);
15444 void SSL_set_default_passwd_cb_userdata(SSL *s, void *u);
15445 pem_password_cb *SSL_get_default_passwd_cb(SSL *s);
15446 void *SSL_get_default_passwd_cb_userdata(SSL *s);
15447
15448 int SSL_CTX_check_private_key(const SSL_CTX *ctx);
15449 int SSL_check_private_key(const SSL *ctx);
15450
15451 int SSL_CTX_set_session_id_context(SSL_CTX *ctx,
15452 const unsigned char *sid_ctx,
15453 unsigned int sid_ctx_len);
15454
15455 SSL *SSL_new(SSL_CTX *ctx);
15456 int SSL_up_ref(SSL *s);
15457 int SSL_is_dtls(const SSL *s);
15458 int SSL_is_tls(const SSL *s);
15459 int SSL_is_quic(const SSL *s);
15460 int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx,
15461 unsigned int sid_ctx_len);
15462
15463 int SSL_CTX_set_purpose(SSL_CTX *ctx, int purpose);
15464 int SSL_set_purpose(SSL *ssl, int purpose);
15465 int SSL_CTX_set_trust(SSL_CTX *ctx, int trust);
15466 int SSL_set_trust(SSL *ssl, int trust);
15467
15468 int SSL_set1_host(SSL *s, const char *hostname);
15469 int SSL_add1_host(SSL *s, const char *hostname);
15470 const char *SSL_get0_peername(SSL *s);
15471 void SSL_set_hostflags(SSL *s, unsigned int flags);
15472
15473 int SSL_CTX_dane_enable(SSL_CTX *ctx);
15474 int SSL_CTX_dane_mtype_set(SSL_CTX *ctx, const EVP_MD *md,
15475 uint8_t mtype, uint8_t ord);
15476 int SSL_dane_enable(SSL *s, const char *basedomain);
15477 int SSL_dane_tlsa_add(SSL *s, uint8_t usage, uint8_t selector,
15478 uint8_t mtype, const unsigned char *data, size_t dlen);
15479 int SSL_get0_dane_authority(SSL *s, X509 **mcert, EVP_PKEY **mspki);
15480 int SSL_get0_dane_tlsa(SSL *s, uint8_t *usage, uint8_t *selector,
15481 uint8_t *mtype, const unsigned char **data,
15482 size_t *dlen);
15483
15484
15485
15486
15487 SSL_DANE *SSL_get0_dane(SSL *ssl);
15488
15489
15490
15491 unsigned long SSL_CTX_dane_set_flags(SSL_CTX *ctx, unsigned long flags);
15492 unsigned long SSL_CTX_dane_clear_flags(SSL_CTX *ctx, unsigned long flags);
15493 unsigned long SSL_dane_set_flags(SSL *ssl, unsigned long flags);
15494 unsigned long SSL_dane_clear_flags(SSL *ssl, unsigned long flags);
15495
15496 int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm);
15497 int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm);
15498
15499 X509_VERIFY_PARAM *SSL_CTX_get0_param(SSL_CTX *ctx);
15500 X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl);
15501
15502
15503
15504 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_CTX_set_srp_username(SSL_CTX *ctx, char *name);
15505 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_CTX_set_srp_password(SSL_CTX *ctx, char *password);
15506 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_CTX_set_srp_strength(SSL_CTX *ctx, int strength);
15507 __attribute__((deprecated("Since OpenSSL " "3.0")))
15508 int SSL_CTX_set_srp_client_pwd_callback(SSL_CTX *ctx,
15509 char *(*cb) (SSL *, void *));
15510 __attribute__((deprecated("Since OpenSSL " "3.0")))
15511 int SSL_CTX_set_srp_verify_param_callback(SSL_CTX *ctx,
15512 int (*cb) (SSL *, void *));
15513 __attribute__((deprecated("Since OpenSSL " "3.0")))
15514 int SSL_CTX_set_srp_username_callback(SSL_CTX *ctx,
15515 int (*cb) (SSL *, int *, void *));
15516 __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_CTX_set_srp_cb_arg(SSL_CTX *ctx, void *arg);
15517
15518 __attribute__((deprecated("Since OpenSSL " "3.0")))
15519 int SSL_set_srp_server_param(SSL *s, const BIGNUM *N, const BIGNUM *g,
15520 BIGNUM *sa, BIGNUM *v, char *info);
15521 __attribute__((deprecated("Since OpenSSL " "3.0")))
15522 int SSL_set_srp_server_param_pw(SSL *s, const char *user, const char *pass,
15523 const char *grp);
15524
15525 __attribute__((deprecated("Since OpenSSL " "3.0"))) BIGNUM *SSL_get_srp_g(SSL *s);
15526 __attribute__((deprecated("Since OpenSSL " "3.0"))) BIGNUM *SSL_get_srp_N(SSL *s);
15527
15528 __attribute__((deprecated("Since OpenSSL " "3.0"))) char *SSL_get_srp_username(SSL *s);
15529 __attribute__((deprecated("Since OpenSSL " "3.0"))) char *SSL_get_srp_userinfo(SSL *s);
15530 # 1963 "include/openssl/ssl.h"
15531 typedef int (*SSL_client_hello_cb_fn) (SSL *s, int *al, void *arg);
15532 void SSL_CTX_set_client_hello_cb(SSL_CTX *c, SSL_client_hello_cb_fn cb,
15533 void *arg);
15534 int SSL_client_hello_isv2(SSL *s);
15535 unsigned int SSL_client_hello_get0_legacy_version(SSL *s);
15536 size_t SSL_client_hello_get0_random(SSL *s, const unsigned char **out);
15537 size_t SSL_client_hello_get0_session_id(SSL *s, const unsigned char **out);
15538 size_t SSL_client_hello_get0_ciphers(SSL *s, const unsigned char **out);
15539 size_t SSL_client_hello_get0_compression_methods(SSL *s,
15540 const unsigned char **out);
15541 int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen);
15542 int SSL_client_hello_get_extension_order(SSL *s, uint16_t *exts,
15543 size_t *num_exts);
15544 int SSL_client_hello_get0_ext(SSL *s, unsigned int type,
15545 const unsigned char **out, size_t *outlen);
15546
15547 void SSL_certs_clear(SSL *s);
15548 void SSL_free(SSL *ssl);
15549
15550
15551
15552
15553 int SSL_waiting_for_async(SSL *s);
15554 int SSL_get_all_async_fds(SSL *s, int *fds, size_t *numfds);
15555 int SSL_get_changed_async_fds(SSL *s, int *addfd,
15556 size_t *numaddfds, int *delfd,
15557 size_t *numdelfds);
15558 int SSL_CTX_set_async_callback(SSL_CTX *ctx, SSL_async_callback_fn callback);
15559 int SSL_CTX_set_async_callback_arg(SSL_CTX *ctx, void *arg);
15560 int SSL_set_async_callback(SSL *s, SSL_async_callback_fn callback);
15561 int SSL_set_async_callback_arg(SSL *s, void *arg);
15562 int SSL_get_async_status(SSL *s, int *status);
15563
15564
15565 int SSL_accept(SSL *ssl);
15566 int SSL_stateless(SSL *s);
15567 int SSL_connect(SSL *ssl);
15568 int SSL_read(SSL *ssl, void *buf, int num);
15569 int SSL_read_ex(SSL *ssl, void *buf, size_t num, size_t *readbytes);
15570
15571
15572
15573
15574
15575 int SSL_read_early_data(SSL *s, void *buf, size_t num,
15576 size_t *readbytes);
15577 int SSL_peek(SSL *ssl, void *buf, int num);
15578 int SSL_peek_ex(SSL *ssl, void *buf, size_t num, size_t *readbytes);
15579 ssize_t SSL_sendfile(SSL *s, int fd, off_t offset, size_t size,
15580 int flags);
15581 int SSL_write(SSL *ssl, const void *buf, int num);
15582 int SSL_write_ex(SSL *s, const void *buf, size_t num, size_t *written);
15583 int SSL_write_early_data(SSL *s, const void *buf, size_t num,
15584 size_t *written);
15585 long SSL_ctrl(SSL *ssl, int cmd, long larg, void *parg);
15586 long SSL_callback_ctrl(SSL *, int, void (*)(void));
15587 long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg);
15588 long SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)(void));
15589
15590
15591
15592 int SSL_write_ex2(SSL *s, const void *buf, size_t num,
15593 uint64_t flags,
15594 size_t *written);
15595
15596
15597
15598
15599
15600 int SSL_get_early_data_status(const SSL *s);
15601
15602 int SSL_get_error(const SSL *s, int ret_code);
15603 const char *SSL_get_version(const SSL *s);
15604 int SSL_get_handshake_rtt(const SSL *s, uint64_t *rtt);
15605
15606
15607
15608 __attribute__((deprecated("Since OpenSSL " "3.0")))
15609 int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth);
15610 # 2057 "include/openssl/ssl.h"
15611 const SSL_METHOD *TLS_method(void);
15612 const SSL_METHOD *TLS_server_method(void);
15613 const SSL_METHOD *TLS_client_method(void);
15614
15615
15616
15617 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_method(void);
15618 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_server_method(void);
15619 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_client_method(void);
15620
15621
15622
15623
15624
15625 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_1_method(void);
15626 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_1_server_method(void);
15627 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_1_client_method(void);
15628
15629
15630
15631
15632
15633 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_2_method(void);
15634 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_2_server_method(void);
15635 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_2_client_method(void);
15636
15637
15638
15639
15640
15641 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *DTLSv1_method(void);
15642 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *DTLSv1_server_method(void);
15643 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *DTLSv1_client_method(void);
15644
15645
15646
15647
15648
15649
15650 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *DTLSv1_2_method(void);
15651 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *DTLSv1_2_server_method(void);
15652 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *DTLSv1_2_client_method(void);
15653
15654
15655
15656 const SSL_METHOD *DTLS_method(void);
15657 const SSL_METHOD *DTLS_server_method(void);
15658 const SSL_METHOD *DTLS_client_method(void);
15659
15660 size_t DTLS_get_data_mtu(const SSL *s);
15661
15662 struct stack_st_SSL_CIPHER *SSL_get_ciphers(const SSL *s);
15663 struct stack_st_SSL_CIPHER *SSL_CTX_get_ciphers(const SSL_CTX *ctx);
15664 struct stack_st_SSL_CIPHER *SSL_get_client_ciphers(const SSL *s);
15665 struct stack_st_SSL_CIPHER *SSL_get1_supported_ciphers(SSL *s);
15666
15667 int SSL_do_handshake(SSL *s);
15668 int SSL_key_update(SSL *s, int updatetype);
15669 int SSL_get_key_update_type(const SSL *s);
15670 int SSL_renegotiate(SSL *s);
15671 int SSL_renegotiate_abbreviated(SSL *s);
15672 int SSL_renegotiate_pending(const SSL *s);
15673 int SSL_new_session_ticket(SSL *s);
15674 int SSL_shutdown(SSL *s);
15675 int SSL_verify_client_post_handshake(SSL *s);
15676 void SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val);
15677 void SSL_set_post_handshake_auth(SSL *s, int val);
15678
15679 const SSL_METHOD *SSL_CTX_get_ssl_method(const SSL_CTX *ctx);
15680 const SSL_METHOD *SSL_get_ssl_method(const SSL *s);
15681 int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method);
15682 const char *SSL_alert_type_string_long(int value);
15683 const char *SSL_alert_type_string(int value);
15684 const char *SSL_alert_desc_string_long(int value);
15685 const char *SSL_alert_desc_string(int value);
15686
15687 void SSL_set0_CA_list(SSL *s, struct stack_st_X509_NAME *name_list);
15688 void SSL_CTX_set0_CA_list(SSL_CTX *ctx, struct stack_st_X509_NAME *name_list);
15689 const struct stack_st_X509_NAME *SSL_get0_CA_list(const SSL *s);
15690 const struct stack_st_X509_NAME *SSL_CTX_get0_CA_list(const SSL_CTX *ctx);
15691 int SSL_add1_to_CA_list(SSL *ssl, const X509 *x);
15692 int SSL_CTX_add1_to_CA_list(SSL_CTX *ctx, const X509 *x);
15693 const struct stack_st_X509_NAME *SSL_get0_peer_CA_list(const SSL *s);
15694
15695 void SSL_set_client_CA_list(SSL *s, struct stack_st_X509_NAME *name_list);
15696 void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, struct stack_st_X509_NAME *name_list);
15697 struct stack_st_X509_NAME *SSL_get_client_CA_list(const SSL *s);
15698 struct stack_st_X509_NAME *SSL_CTX_get_client_CA_list(const SSL_CTX *s);
15699 int SSL_add_client_CA(SSL *ssl, X509 *x);
15700 int SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *x);
15701
15702 void SSL_set_connect_state(SSL *s);
15703 void SSL_set_accept_state(SSL *s);
15704
15705 long SSL_get_default_timeout(const SSL *s);
15706
15707
15708
15709
15710
15711 char *SSL_CIPHER_description(const SSL_CIPHER *, char *buf, int size);
15712 struct stack_st_X509_NAME *SSL_dup_CA_list(const struct stack_st_X509_NAME *sk);
15713
15714 SSL *SSL_dup(SSL *ssl);
15715
15716 X509 *SSL_get_certificate(const SSL *ssl);
15717
15718
15719
15720 struct evp_pkey_st *SSL_get_privatekey(const SSL *ssl);
15721
15722 X509 *SSL_CTX_get0_certificate(const SSL_CTX *ctx);
15723 EVP_PKEY *SSL_CTX_get0_privatekey(const SSL_CTX *ctx);
15724
15725 void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode);
15726 int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx);
15727 void SSL_set_quiet_shutdown(SSL *ssl, int mode);
15728 int SSL_get_quiet_shutdown(const SSL *ssl);
15729 void SSL_set_shutdown(SSL *ssl, int mode);
15730 int SSL_get_shutdown(const SSL *ssl);
15731 int SSL_version(const SSL *ssl);
15732 int SSL_client_version(const SSL *s);
15733 int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);
15734 int SSL_CTX_set_default_verify_dir(SSL_CTX *ctx);
15735 int SSL_CTX_set_default_verify_file(SSL_CTX *ctx);
15736 int SSL_CTX_set_default_verify_store(SSL_CTX *ctx);
15737 int SSL_CTX_load_verify_file(SSL_CTX *ctx, const char *CAfile);
15738 int SSL_CTX_load_verify_dir(SSL_CTX *ctx, const char *CApath);
15739 int SSL_CTX_load_verify_store(SSL_CTX *ctx, const char *CAstore);
15740 int SSL_CTX_load_verify_locations(SSL_CTX *ctx,
15741 const char *CAfile,
15742 const char *CApath);
15743
15744 SSL_SESSION *SSL_get_session(const SSL *ssl);
15745 SSL_SESSION *SSL_get1_session(SSL *ssl);
15746 SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl);
15747 SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx);
15748 void SSL_set_info_callback(SSL *ssl,
15749 void (*cb) (const SSL *ssl, int type, int val));
15750 void (*SSL_get_info_callback(const SSL *ssl)) (const SSL *ssl, int type,
15751 int val);
15752 OSSL_HANDSHAKE_STATE SSL_get_state(const SSL *ssl);
15753
15754 void SSL_set_verify_result(SSL *ssl, long v);
15755 long SSL_get_verify_result(const SSL *ssl);
15756 struct stack_st_X509 *SSL_get0_verified_chain(const SSL *s);
15757
15758 size_t SSL_get_client_random(const SSL *ssl, unsigned char *out,
15759 size_t outlen);
15760 size_t SSL_get_server_random(const SSL *ssl, unsigned char *out,
15761 size_t outlen);
15762 size_t SSL_SESSION_get_master_key(const SSL_SESSION *sess,
15763 unsigned char *out, size_t outlen);
15764 int SSL_SESSION_set1_master_key(SSL_SESSION *sess,
15765 const unsigned char *in, size_t len);
15766 uint8_t SSL_SESSION_get_max_fragment_length(const SSL_SESSION *sess);
15767
15768
15769
15770 int SSL_set_ex_data(SSL *ssl, int idx, void *data);
15771 void *SSL_get_ex_data(const SSL *ssl, int idx);
15772
15773
15774 int SSL_SESSION_set_ex_data(SSL_SESSION *ss, int idx, void *data);
15775 void *SSL_SESSION_get_ex_data(const SSL_SESSION *ss, int idx);
15776
15777
15778 int SSL_CTX_set_ex_data(SSL_CTX *ssl, int idx, void *data);
15779 void *SSL_CTX_get_ex_data(const SSL_CTX *ssl, int idx);
15780
15781 int SSL_get_ex_data_X509_STORE_CTX_idx(void);
15782 # 2268 "include/openssl/ssl.h"
15783 void SSL_CTX_set_default_read_buffer_len(SSL_CTX *ctx, size_t len);
15784 void SSL_set_default_read_buffer_len(SSL *s, size_t len);
15785
15786
15787
15788
15789 __attribute__((deprecated("Since OpenSSL " "3.0")))
15790 void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,
15791 DH *(*dh) (SSL *ssl, int is_export,
15792 int keylength));
15793 __attribute__((deprecated("Since OpenSSL " "3.0")))
15794 void SSL_set_tmp_dh_callback(SSL *ssl,
15795 DH *(*dh) (SSL *ssl, int is_export,
15796 int keylength));
15797
15798
15799
15800 const COMP_METHOD *SSL_get_current_compression(const SSL *s);
15801 const COMP_METHOD *SSL_get_current_expansion(const SSL *s);
15802 const char *SSL_COMP_get_name(const COMP_METHOD *comp);
15803 const char *SSL_COMP_get0_name(const SSL_COMP *comp);
15804 int SSL_COMP_get_id(const SSL_COMP *comp);
15805 struct stack_st_SSL_COMP *SSL_COMP_get_compression_methods(void);
15806 struct stack_st_SSL_COMP *SSL_COMP_set0_compression_methods(struct stack_st_SSL_COMP
15807 *meths);
15808
15809
15810
15811 int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm);
15812
15813 const SSL_CIPHER *SSL_CIPHER_find(SSL *ssl, const unsigned char *ptr);
15814 int SSL_CIPHER_get_cipher_nid(const SSL_CIPHER *c);
15815 int SSL_CIPHER_get_digest_nid(const SSL_CIPHER *c);
15816 int SSL_bytes_to_cipher_list(SSL *s, const unsigned char *bytes, size_t len,
15817 int isv2format, struct stack_st_SSL_CIPHER **sk,
15818 struct stack_st_SSL_CIPHER **scsvs);
15819
15820
15821 int SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len);
15822
15823 int SSL_set_session_ticket_ext_cb(SSL *s,
15824 tls_session_ticket_ext_cb_fn cb,
15825 void *arg);
15826
15827
15828 int SSL_set_session_secret_cb(SSL *s,
15829 tls_session_secret_cb_fn session_secret_cb,
15830 void *arg);
15831
15832 void SSL_CTX_set_not_resumable_session_callback(SSL_CTX *ctx,
15833 int (*cb) (SSL *ssl,
15834 int
15835 is_forward_secure));
15836
15837 void SSL_set_not_resumable_session_callback(SSL *ssl,
15838 int (*cb) (SSL *ssl,
15839 int is_forward_secure));
15840
15841 void SSL_CTX_set_record_padding_callback(SSL_CTX *ctx,
15842 size_t (*cb) (SSL *ssl, int type,
15843 size_t len, void *arg));
15844 void SSL_CTX_set_record_padding_callback_arg(SSL_CTX *ctx, void *arg);
15845 void *SSL_CTX_get_record_padding_callback_arg(const SSL_CTX *ctx);
15846 int SSL_CTX_set_block_padding(SSL_CTX *ctx, size_t block_size);
15847
15848 int SSL_set_record_padding_callback(SSL *ssl,
15849 size_t (*cb) (SSL *ssl, int type,
15850 size_t len, void *arg));
15851 void SSL_set_record_padding_callback_arg(SSL *ssl, void *arg);
15852 void *SSL_get_record_padding_callback_arg(const SSL *ssl);
15853 int SSL_set_block_padding(SSL *ssl, size_t block_size);
15854
15855 int SSL_set_num_tickets(SSL *s, size_t num_tickets);
15856 size_t SSL_get_num_tickets(const SSL *s);
15857 int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets);
15858 size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx);
15859
15860
15861 int SSL_handle_events(SSL *s);
15862 int SSL_get_event_timeout(SSL *s, struct timeval *tv, int *is_infinite);
15863 int SSL_get_rpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc);
15864 int SSL_get_wpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc);
15865 int SSL_net_read_desired(SSL *s);
15866 int SSL_net_write_desired(SSL *s);
15867 int SSL_set_blocking_mode(SSL *s, int blocking);
15868 int SSL_get_blocking_mode(SSL *s);
15869 int SSL_set1_initial_peer_addr(SSL *s, const BIO_ADDR *peer_addr);
15870 SSL *SSL_get0_connection(SSL *s);
15871 int SSL_is_connection(SSL *s);
15872
15873
15874
15875
15876
15877 int SSL_get_stream_type(SSL *s);
15878
15879 uint64_t SSL_get_stream_id(SSL *s);
15880 int SSL_is_stream_local(SSL *s);
15881
15882
15883
15884
15885 int SSL_set_default_stream_mode(SSL *s, uint32_t mode);
15886
15887
15888
15889
15890 SSL *SSL_new_stream(SSL *s, uint64_t flags);
15891
15892
15893
15894
15895 int SSL_set_incoming_stream_policy(SSL *s, int policy, uint64_t aec);
15896
15897
15898 SSL *SSL_accept_stream(SSL *s, uint64_t flags);
15899 size_t SSL_get_accept_stream_queue_len(SSL *s);
15900
15901
15902 int SSL_inject_net_dgram(SSL *s, const unsigned char *buf,
15903 size_t buf_len,
15904 const BIO_ADDR *peer,
15905 const BIO_ADDR *local);
15906
15907
15908 typedef struct ssl_shutdown_ex_args_st {
15909 uint64_t quic_error_code;
15910 const char *quic_reason;
15911 } SSL_SHUTDOWN_EX_ARGS;
15912
15913
15914
15915
15916
15917
15918 int SSL_shutdown_ex(SSL *ssl, uint64_t flags,
15919 const SSL_SHUTDOWN_EX_ARGS *args,
15920 size_t args_len);
15921
15922 int SSL_stream_conclude(SSL *ssl, uint64_t flags);
15923
15924 typedef struct ssl_stream_reset_args_st {
15925 uint64_t quic_error_code;
15926 } SSL_STREAM_RESET_ARGS;
15927
15928 int SSL_stream_reset(SSL *ssl,
15929 const SSL_STREAM_RESET_ARGS *args,
15930 size_t args_len);
15931 # 2424 "include/openssl/ssl.h"
15932 int SSL_get_stream_read_state(SSL *ssl);
15933 int SSL_get_stream_write_state(SSL *ssl);
15934
15935 int SSL_get_stream_read_error_code(SSL *ssl, uint64_t *app_error_code);
15936 int SSL_get_stream_write_error_code(SSL *ssl, uint64_t *app_error_code);
15937
15938
15939
15940
15941 typedef struct ssl_conn_close_info_st {
15942 uint64_t error_code, frame_type;
15943 const char *reason;
15944 size_t reason_len;
15945 uint32_t flags;
15946 } SSL_CONN_CLOSE_INFO;
15947
15948 int SSL_get_conn_close_info(SSL *ssl,
15949 SSL_CONN_CLOSE_INFO *info,
15950 size_t info_len);
15951 # 2464 "include/openssl/ssl.h"
15952 int SSL_get_value_uint(SSL *s, uint32_t class_, uint32_t id, uint64_t *v);
15953 int SSL_set_value_uint(SSL *s, uint32_t class_, uint32_t id, uint64_t v);
15954 # 2538 "include/openssl/ssl.h"
15955 typedef struct ssl_poll_item_st {
15956 BIO_POLL_DESCRIPTOR desc;
15957 uint64_t events, revents;
15958 } SSL_POLL_ITEM;
15959
15960
15961
15962 int SSL_poll(SSL_POLL_ITEM *items,
15963 size_t num_items,
15964 size_t stride,
15965 const struct timeval *timeout,
15966 uint64_t flags,
15967 size_t *result_count);
15968
15969 static inline __attribute__((unused)) BIO_POLL_DESCRIPTOR
15970 SSL_as_poll_descriptor(SSL *s)
15971 {
15972 BIO_POLL_DESCRIPTOR d;
15973
15974 d.type = 2;
15975 d.value.ssl = s;
15976 return d;
15977 }
15978
15979
15980
15981
15982
15983 int SSL_session_reused(const SSL *s);
15984 int SSL_is_server(const SSL *s);
15985
15986 SSL_CONF_CTX *SSL_CONF_CTX_new(void);
15987 int SSL_CONF_CTX_finish(SSL_CONF_CTX *cctx);
15988 void SSL_CONF_CTX_free(SSL_CONF_CTX *cctx);
15989 unsigned int SSL_CONF_CTX_set_flags(SSL_CONF_CTX *cctx, unsigned int flags);
15990 unsigned int SSL_CONF_CTX_clear_flags(SSL_CONF_CTX *cctx,
15991 unsigned int flags);
15992 int SSL_CONF_CTX_set1_prefix(SSL_CONF_CTX *cctx, const char *pre);
15993
15994 void SSL_CONF_CTX_set_ssl(SSL_CONF_CTX *cctx, SSL *ssl);
15995 void SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *cctx, SSL_CTX *ctx);
15996
15997 int SSL_CONF_cmd(SSL_CONF_CTX *cctx, const char *cmd, const char *value);
15998 int SSL_CONF_cmd_argv(SSL_CONF_CTX *cctx, int *pargc, char ***pargv);
15999 int SSL_CONF_cmd_value_type(SSL_CONF_CTX *cctx, const char *cmd);
16000
16001 void SSL_add_ssl_module(void);
16002 int SSL_config(SSL *s, const char *name);
16003 int SSL_CTX_config(SSL_CTX *ctx, const char *name);
16004
16005
16006 void SSL_trace(int write_p, int version, int content_type,
16007 const void *buf, size_t len, SSL *ssl, void *arg);
16008
16009
16010
16011 int DTLSv1_listen(SSL *s, BIO_ADDR *client);
16012 # 2605 "include/openssl/ssl.h"
16013 typedef int (*ssl_ct_validation_cb)(const CT_POLICY_EVAL_CTX *ctx,
16014 const struct stack_st_SCT *scts, void *arg);
16015 # 2620 "include/openssl/ssl.h"
16016 int SSL_set_ct_validation_callback(SSL *s, ssl_ct_validation_cb callback,
16017 void *arg);
16018 int SSL_CTX_set_ct_validation_callback(SSL_CTX *ctx,
16019 ssl_ct_validation_cb callback,
16020 void *arg);
16021 # 2635 "include/openssl/ssl.h"
16022 enum {
16023 SSL_CT_VALIDATION_PERMISSIVE = 0,
16024 SSL_CT_VALIDATION_STRICT
16025 };
16026 # 2648 "include/openssl/ssl.h"
16027 int SSL_enable_ct(SSL *s, int validation_mode);
16028 int SSL_CTX_enable_ct(SSL_CTX *ctx, int validation_mode);
16029
16030
16031
16032
16033 int SSL_ct_is_enabled(const SSL *s);
16034 int SSL_CTX_ct_is_enabled(const SSL_CTX *ctx);
16035
16036
16037 const struct stack_st_SCT *SSL_get0_peer_scts(SSL *s);
16038 # 2667 "include/openssl/ssl.h"
16039 int SSL_CTX_set_default_ctlog_list_file(SSL_CTX *ctx);
16040 # 2676 "include/openssl/ssl.h"
16041 int SSL_CTX_set_ctlog_list_file(SSL_CTX *ctx, const char *path);
16042
16043
16044
16045
16046
16047 void SSL_CTX_set0_ctlog_store(SSL_CTX *ctx, CTLOG_STORE *logs);
16048 # 2691 "include/openssl/ssl.h"
16049 const CTLOG_STORE *SSL_CTX_get0_ctlog_store(const SSL_CTX *ctx);
16050 # 2753 "include/openssl/ssl.h"
16051 void SSL_set_security_level(SSL *s, int level);
16052 int SSL_get_security_level(const SSL *s);
16053 void SSL_set_security_callback(SSL *s,
16054 int (*cb) (const SSL *s, const SSL_CTX *ctx,
16055 int op, int bits, int nid,
16056 void *other, void *ex));
16057 int (*SSL_get_security_callback(const SSL *s)) (const SSL *s,
16058 const SSL_CTX *ctx, int op,
16059 int bits, int nid, void *other,
16060 void *ex);
16061 void SSL_set0_security_ex_data(SSL *s, void *ex);
16062 void *SSL_get0_security_ex_data(const SSL *s);
16063
16064 void SSL_CTX_set_security_level(SSL_CTX *ctx, int level);
16065 int SSL_CTX_get_security_level(const SSL_CTX *ctx);
16066 void SSL_CTX_set_security_callback(SSL_CTX *ctx,
16067 int (*cb) (const SSL *s, const SSL_CTX *ctx,
16068 int op, int bits, int nid,
16069 void *other, void *ex));
16070 int (*SSL_CTX_get_security_callback(const SSL_CTX *ctx)) (const SSL *s,
16071 const SSL_CTX *ctx,
16072 int op, int bits,
16073 int nid,
16074 void *other,
16075 void *ex);
16076 void SSL_CTX_set0_security_ex_data(SSL_CTX *ctx, void *ex);
16077 void *SSL_CTX_get0_security_ex_data(const SSL_CTX *ctx);
16078 # 2788 "include/openssl/ssl.h"
16079 int OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
16080
16081
16082
16083
16084
16085 int SSL_free_buffers(SSL *ssl);
16086 int SSL_alloc_buffers(SSL *ssl);
16087
16088
16089
16090 typedef int SSL_TICKET_STATUS;
16091 # 2818 "include/openssl/ssl.h"
16092 typedef int SSL_TICKET_RETURN;
16093 # 2831 "include/openssl/ssl.h"
16094 typedef int (*SSL_CTX_generate_session_ticket_fn)(SSL *s, void *arg);
16095 typedef SSL_TICKET_RETURN (*SSL_CTX_decrypt_session_ticket_fn)(SSL *s, SSL_SESSION *ss,
16096 const unsigned char *keyname,
16097 size_t keyname_length,
16098 SSL_TICKET_STATUS status,
16099 void *arg);
16100 int SSL_CTX_set_session_ticket_cb(SSL_CTX *ctx,
16101 SSL_CTX_generate_session_ticket_fn gen_cb,
16102 SSL_CTX_decrypt_session_ticket_fn dec_cb,
16103 void *arg);
16104 int SSL_SESSION_set1_ticket_appdata(SSL_SESSION *ss, const void *data, size_t len);
16105 int SSL_SESSION_get0_ticket_appdata(SSL_SESSION *ss, void **data, size_t *len);
16106
16107 typedef unsigned int (*DTLS_timer_cb)(SSL *s, unsigned int timer_us);
16108
16109 void DTLS_set_timer_cb(SSL *s, DTLS_timer_cb cb);
16110
16111
16112 typedef int (*SSL_allow_early_data_cb_fn)(SSL *s, void *arg);
16113 void SSL_CTX_set_allow_early_data_cb(SSL_CTX *ctx,
16114 SSL_allow_early_data_cb_fn cb,
16115 void *arg);
16116 void SSL_set_allow_early_data_cb(SSL *s,
16117 SSL_allow_early_data_cb_fn cb,
16118 void *arg);
16119
16120
16121 const char *OSSL_default_cipher_list(void);
16122 const char *OSSL_default_ciphersuites(void);
16123
16124
16125
16126 int SSL_CTX_compress_certs(SSL_CTX *ctx, int alg);
16127 int SSL_compress_certs(SSL *ssl, int alg);
16128
16129 int SSL_CTX_set1_cert_comp_preference(SSL_CTX *ctx, int *algs, size_t len);
16130 int SSL_set1_cert_comp_preference(SSL *ssl, int *algs, size_t len);
16131
16132 int SSL_CTX_set1_compressed_cert(SSL_CTX *ctx, int algorithm, unsigned char *comp_data,
16133 size_t comp_length, size_t orig_length);
16134 int SSL_set1_compressed_cert(SSL *ssl, int algorithm, unsigned char *comp_data,
16135 size_t comp_length, size_t orig_length);
16136 size_t SSL_CTX_get1_compressed_cert(SSL_CTX *ctx, int alg, unsigned char **data, size_t *orig_len);
16137 size_t SSL_get1_compressed_cert(SSL *ssl, int alg, unsigned char **data, size_t *orig_len);
16138
16139 int SSL_add_expected_rpk(SSL *s, EVP_PKEY *rpk);
16140 EVP_PKEY *SSL_get0_peer_rpk(const SSL *s);
16141 EVP_PKEY *SSL_SESSION_get0_peer_rpk(SSL_SESSION *s);
16142 int SSL_get_negotiated_client_cert_type(const SSL *s);
16143 int SSL_get_negotiated_server_cert_type(const SSL *s);
16144
16145 int SSL_set1_client_cert_type(SSL *s, const unsigned char *val, size_t len);
16146 int SSL_set1_server_cert_type(SSL *s, const unsigned char *val, size_t len);
16147 int SSL_CTX_set1_client_cert_type(SSL_CTX *ctx, const unsigned char *val, size_t len);
16148 int SSL_CTX_set1_server_cert_type(SSL_CTX *ctx, const unsigned char *val, size_t len);
16149 int SSL_get0_client_cert_type(const SSL *s, unsigned char **t, size_t *len);
16150 int SSL_get0_server_cert_type(const SSL *s, unsigned char **t, size_t *len);
16151 int SSL_CTX_get0_client_cert_type(const SSL_CTX *ctx, unsigned char **t, size_t *len);
16152 int SSL_CTX_get0_server_cert_type(const SSL_CTX *s, unsigned char **t, size_t *len);
16153 # 27 "ssl/ssl_local.h" 2
16154
16155
16156
16157 # 1 "include/internal/recordmethod.h" 1
16158 # 12 "include/internal/recordmethod.h"
16159
16160 # 31 "include/internal/recordmethod.h"
16161 typedef struct ossl_record_method_st OSSL_RECORD_METHOD;
16162
16163
16164
16165
16166
16167 typedef struct ossl_record_layer_st OSSL_RECORD_LAYER;
16168 # 65 "include/internal/recordmethod.h"
16169 struct ossl_record_template_st {
16170 unsigned char type;
16171 unsigned int version;
16172 const unsigned char *buf;
16173 size_t buflen;
16174 };
16175
16176 typedef struct ossl_record_template_st OSSL_RECORD_TEMPLATE;
16177 # 88 "include/internal/recordmethod.h"
16178 struct ossl_record_method_st {
16179 # 122 "include/internal/recordmethod.h"
16180 int (*new_record_layer)(OSSL_LIB_CTX *libctx,
16181 const char *propq, int vers,
16182 int role, int direction,
16183 int level,
16184 uint16_t epoch,
16185 unsigned char *secret,
16186 size_t secretlen,
16187 unsigned char *key,
16188 size_t keylen,
16189 unsigned char *iv,
16190 size_t ivlen,
16191 unsigned char *mackey,
16192 size_t mackeylen,
16193 const EVP_CIPHER *ciph,
16194 size_t taglen,
16195 int mactype,
16196 const EVP_MD *md,
16197 COMP_METHOD *comp,
16198 const EVP_MD *kdfdigest,
16199 BIO *prev,
16200 BIO *transport,
16201 BIO *next,
16202 BIO_ADDR *local,
16203 BIO_ADDR *peer,
16204 const OSSL_PARAM *settings,
16205 const OSSL_PARAM *options,
16206 const OSSL_DISPATCH *fns,
16207 void *cbarg,
16208 void *rlarg,
16209 OSSL_RECORD_LAYER **ret);
16210 int (*free)(OSSL_RECORD_LAYER *rl);
16211
16212
16213 int (*unprocessed_read_pending)(OSSL_RECORD_LAYER *rl);
16214
16215
16216
16217
16218
16219 int (*processed_read_pending)(OSSL_RECORD_LAYER *rl);
16220
16221
16222
16223
16224
16225 size_t (*app_data_pending)(OSSL_RECORD_LAYER *rl);
16226 # 182 "include/internal/recordmethod.h"
16227 size_t (*get_max_records)(OSSL_RECORD_LAYER *rl, uint8_t type, size_t len,
16228 size_t maxfrag, size_t *preffrag);
16229 # 205 "include/internal/recordmethod.h"
16230 int (*write_records)(OSSL_RECORD_LAYER *rl, OSSL_RECORD_TEMPLATE *templates,
16231 size_t numtempl);
16232 # 217 "include/internal/recordmethod.h"
16233 int (*retry_write_records)(OSSL_RECORD_LAYER *rl);
16234 # 234 "include/internal/recordmethod.h"
16235 int (*read_record)(OSSL_RECORD_LAYER *rl, void **rechandle, int *rversion,
16236 uint8_t *type, const unsigned char **data, size_t *datalen,
16237 uint16_t *epoch, unsigned char *seq_num);
16238
16239
16240
16241
16242
16243
16244 int (*release_record)(OSSL_RECORD_LAYER *rl, void *rechandle, size_t length);
16245
16246
16247
16248
16249
16250
16251 int (*get_alert_code)(OSSL_RECORD_LAYER *rl);
16252
16253
16254
16255
16256
16257 int (*set1_bio)(OSSL_RECORD_LAYER *rl, BIO *bio);
16258
16259
16260 int (*set_protocol_version)(OSSL_RECORD_LAYER *rl, int version);
16261
16262
16263
16264
16265
16266
16267 void (*set_plain_alerts)(OSSL_RECORD_LAYER *rl, int allow);
16268
16269
16270
16271
16272
16273 void (*set_first_handshake)(OSSL_RECORD_LAYER *rl, int first);
16274
16275
16276
16277
16278
16279 void (*set_max_pipelines)(OSSL_RECORD_LAYER *rl, size_t max_pipelines);
16280
16281
16282
16283
16284
16285 void (*set_in_init)(OSSL_RECORD_LAYER *rl, int in_init);
16286
16287
16288
16289
16290 void (*get_state)(OSSL_RECORD_LAYER *rl, const char **shortstr,
16291 const char **longstr);
16292
16293
16294
16295
16296
16297 int (*set_options)(OSSL_RECORD_LAYER *rl, const OSSL_PARAM *options);
16298
16299 const COMP_METHOD *(*get_compression)(OSSL_RECORD_LAYER *rl);
16300
16301
16302
16303
16304
16305
16306 void (*set_max_frag_len)(OSSL_RECORD_LAYER *rl, size_t max_frag_len);
16307
16308
16309
16310
16311
16312 size_t (*get_max_record_overhead)(OSSL_RECORD_LAYER *rl);
16313
16314
16315
16316
16317 int (*increment_sequence_ctr)(OSSL_RECORD_LAYER *rl);
16318
16319
16320
16321
16322
16323 int (*alloc_buffers)(OSSL_RECORD_LAYER *rl);
16324
16325
16326
16327
16328
16329 int (*free_buffers)(OSSL_RECORD_LAYER *rl);
16330 };
16331
16332
16333
16334 extern const OSSL_RECORD_METHOD ossl_tls_record_method;
16335
16336
16337
16338 extern const OSSL_RECORD_METHOD ossl_dtls_record_method;
16339 # 31 "ssl/ssl_local.h" 2
16340 # 1 "include/internal/statem.h" 1
16341 # 22 "include/internal/statem.h"
16342 typedef enum {
16343
16344 WORK_ERROR,
16345
16346 WORK_FINISHED_STOP,
16347
16348 WORK_FINISHED_CONTINUE,
16349
16350 WORK_MORE_A,
16351
16352 WORK_MORE_B,
16353
16354 WORK_MORE_C
16355 } WORK_STATE;
16356
16357
16358 typedef enum {
16359
16360 WRITE_TRAN_ERROR,
16361
16362 WRITE_TRAN_CONTINUE,
16363
16364 WRITE_TRAN_FINISHED
16365 } WRITE_TRAN;
16366
16367
16368 typedef enum {
16369
16370 MSG_FLOW_UNINITED,
16371
16372 MSG_FLOW_ERROR,
16373
16374 MSG_FLOW_READING,
16375
16376 MSG_FLOW_WRITING,
16377
16378 MSG_FLOW_FINISHED
16379 } MSG_FLOW_STATE;
16380
16381
16382 typedef enum {
16383 READ_STATE_HEADER,
16384 READ_STATE_BODY,
16385 READ_STATE_POST_PROCESS
16386 } READ_STATE;
16387
16388
16389 typedef enum {
16390 WRITE_STATE_TRANSITION,
16391 WRITE_STATE_PRE_WORK,
16392 WRITE_STATE_SEND,
16393 WRITE_STATE_POST_WORK
16394 } WRITE_STATE;
16395
16396 typedef enum {
16397 CON_FUNC_ERROR = 0,
16398 CON_FUNC_SUCCESS,
16399 CON_FUNC_DONT_SEND
16400 } CON_FUNC_RETURN;
16401
16402 typedef int (*ossl_statem_mutate_handshake_cb)(const unsigned char *msgin,
16403 size_t inlen,
16404 unsigned char **msgout,
16405 size_t *outlen,
16406 void *arg);
16407
16408 typedef void (*ossl_statem_finish_mutate_handshake_cb)(void *arg);
16409 # 98 "include/internal/statem.h"
16410 struct ossl_statem_st {
16411 MSG_FLOW_STATE state;
16412 WRITE_STATE write_state;
16413 WORK_STATE write_state_work;
16414 READ_STATE read_state;
16415 WORK_STATE read_state_work;
16416 OSSL_HANDSHAKE_STATE hand_state;
16417
16418 OSSL_HANDSHAKE_STATE request_state;
16419 int in_init;
16420 int read_state_first_init;
16421
16422 int in_handshake;
16423
16424
16425
16426
16427 int cleanuphand;
16428
16429 unsigned int no_cert_verify;
16430 int use_timer;
16431
16432
16433 ossl_statem_mutate_handshake_cb mutate_handshake_cb;
16434 ossl_statem_finish_mutate_handshake_cb finish_mutate_handshake_cb;
16435 void *mutatearg;
16436 unsigned int write_in_progress : 1;
16437 };
16438 typedef struct ossl_statem_st OSSL_STATEM;
16439 # 135 "include/internal/statem.h"
16440 typedef struct ssl_connection_st SSL_CONNECTION;
16441
16442 int ossl_statem_accept(SSL *s);
16443 int ossl_statem_connect(SSL *s);
16444 OSSL_HANDSHAKE_STATE ossl_statem_get_state(SSL_CONNECTION *s);
16445 void ossl_statem_clear(SSL_CONNECTION *s);
16446 void ossl_statem_set_renegotiate(SSL_CONNECTION *s);
16447 void ossl_statem_send_fatal(SSL_CONNECTION *s, int al);
16448 void ossl_statem_fatal(SSL_CONNECTION *s, int al, int reason,
16449 const char *fmt, ...);
16450
16451
16452
16453
16454
16455
16456
16457 int ossl_statem_in_error(const SSL_CONNECTION *s);
16458 void ossl_statem_set_in_init(SSL_CONNECTION *s, int init);
16459 int ossl_statem_get_in_handshake(SSL_CONNECTION *s);
16460 void ossl_statem_set_in_handshake(SSL_CONNECTION *s, int inhand);
16461 int ossl_statem_skip_early_data(SSL_CONNECTION *s);
16462 void ossl_statem_check_finish_init(SSL_CONNECTION *s, int send);
16463 void ossl_statem_set_hello_verify_done(SSL_CONNECTION *s);
16464 int ossl_statem_app_data_allowed(SSL_CONNECTION *s);
16465 int ossl_statem_export_allowed(SSL_CONNECTION *s);
16466 int ossl_statem_export_early_allowed(SSL_CONNECTION *s);
16467
16468
16469 int statem_flush(SSL_CONNECTION *s);
16470
16471 int ossl_statem_set_mutator(SSL *s,
16472 ossl_statem_mutate_handshake_cb mutate_handshake_cb,
16473 ossl_statem_finish_mutate_handshake_cb finish_mutate_handshake_cb,
16474 void *mutatearg);
16475 # 32 "ssl/ssl_local.h" 2
16476 # 1 "include/internal/packet.h" 1
16477 # 12 "include/internal/packet.h"
16478
16479 # 22 "include/internal/packet.h"
16480 typedef struct {
16481
16482 const unsigned char *curr;
16483
16484 size_t remaining;
16485 } PACKET;
16486
16487
16488 static inline void packet_forward(PACKET *pkt, size_t len)
16489 {
16490 pkt->curr += len;
16491 pkt->remaining -= len;
16492 }
16493
16494
16495
16496
16497 static inline size_t PACKET_remaining(const PACKET *pkt)
16498 {
16499 return pkt->remaining;
16500 }
16501
16502
16503
16504
16505
16506
16507
16508 static inline const unsigned char *PACKET_end(const PACKET *pkt)
16509 {
16510 return pkt->curr + pkt->remaining;
16511 }
16512
16513
16514
16515
16516
16517 static inline const unsigned char *PACKET_data(const PACKET *pkt)
16518 {
16519 return pkt->curr;
16520 }
16521
16522
16523
16524
16525
16526
16527 static inline int PACKET_buf_init(PACKET *pkt,
16528 const unsigned char *buf,
16529 size_t len)
16530 {
16531
16532 if (len > (size_t)(
16533 # 74 "include/internal/packet.h" 3 4
16534 (18446744073709551615UL)
16535 # 74 "include/internal/packet.h"
16536 / 2))
16537 return 0;
16538
16539 pkt->curr = buf;
16540 pkt->remaining = len;
16541 return 1;
16542 }
16543
16544
16545 static inline void PACKET_null_init(PACKET *pkt)
16546 {
16547 pkt->curr =
16548 # 85 "include/internal/packet.h" 3 4
16549 ((void *)0)
16550 # 85 "include/internal/packet.h"
16551 ;
16552 pkt->remaining = 0;
16553 }
16554
16555
16556
16557
16558
16559
16560 static inline int PACKET_equal(const PACKET *pkt, const void *ptr,
16561 size_t num)
16562 {
16563 if (PACKET_remaining(pkt) != num)
16564 return 0;
16565 return CRYPTO_memcmp(pkt->curr, ptr, num) == 0;
16566 }
16567
16568
16569
16570
16571
16572
16573 static inline int PACKET_peek_sub_packet(const PACKET *pkt,
16574 PACKET *subpkt, size_t len)
16575 {
16576 if (PACKET_remaining(pkt) < len)
16577 return 0;
16578
16579 return PACKET_buf_init(subpkt, pkt->curr, len);
16580 }
16581
16582
16583
16584
16585
16586
16587 static inline int PACKET_get_sub_packet(PACKET *pkt,
16588 PACKET *subpkt, size_t len)
16589 {
16590 if (!PACKET_peek_sub_packet(pkt, subpkt, len))
16591 return 0;
16592
16593 packet_forward(pkt, len);
16594
16595 return 1;
16596 }
16597
16598
16599
16600
16601
16602 static inline int PACKET_peek_net_2(const PACKET *pkt,
16603 unsigned int *data)
16604 {
16605 if (PACKET_remaining(pkt) < 2)
16606 return 0;
16607
16608 *data = ((unsigned int)(*pkt->curr)) << 8;
16609 *data |= *(pkt->curr + 1);
16610
16611 return 1;
16612 }
16613
16614
16615
16616 static inline int PACKET_get_net_2(PACKET *pkt, unsigned int *data)
16617 {
16618 if (!PACKET_peek_net_2(pkt, data))
16619 return 0;
16620
16621 packet_forward(pkt, 2);
16622
16623 return 1;
16624 }
16625
16626
16627 static inline int PACKET_get_net_2_len(PACKET *pkt, size_t *data)
16628 {
16629 unsigned int i;
16630 int ret = PACKET_get_net_2(pkt, &i);
16631
16632 if (ret)
16633 *data = (size_t)i;
16634
16635 return ret;
16636 }
16637
16638
16639
16640
16641
16642 static inline int PACKET_peek_net_3(const PACKET *pkt,
16643 unsigned long *data)
16644 {
16645 if (PACKET_remaining(pkt) < 3)
16646 return 0;
16647
16648 *data = ((unsigned long)(*pkt->curr)) << 16;
16649 *data |= ((unsigned long)(*(pkt->curr + 1))) << 8;
16650 *data |= *(pkt->curr + 2);
16651
16652 return 1;
16653 }
16654
16655
16656
16657 static inline int PACKET_get_net_3(PACKET *pkt, unsigned long *data)
16658 {
16659 if (!PACKET_peek_net_3(pkt, data))
16660 return 0;
16661
16662 packet_forward(pkt, 3);
16663
16664 return 1;
16665 }
16666
16667
16668 static inline int PACKET_get_net_3_len(PACKET *pkt, size_t *data)
16669 {
16670 unsigned long i;
16671 int ret = PACKET_get_net_3(pkt, &i);
16672
16673 if (ret)
16674 *data = (size_t)i;
16675
16676 return ret;
16677 }
16678
16679
16680
16681
16682
16683 static inline int PACKET_peek_net_4(const PACKET *pkt,
16684 unsigned long *data)
16685 {
16686 if (PACKET_remaining(pkt) < 4)
16687 return 0;
16688
16689 *data = ((unsigned long)(*pkt->curr)) << 24;
16690 *data |= ((unsigned long)(*(pkt->curr + 1))) << 16;
16691 *data |= ((unsigned long)(*(pkt->curr + 2))) << 8;
16692 *data |= *(pkt->curr + 3);
16693
16694 return 1;
16695 }
16696
16697
16698
16699
16700
16701 static inline int PACKET_peek_net_8(const PACKET *pkt,
16702 uint64_t *data)
16703 {
16704 if (PACKET_remaining(pkt) < 8)
16705 return 0;
16706
16707 *data = ((uint64_t)(*pkt->curr)) << 56;
16708 *data |= ((uint64_t)(*(pkt->curr + 1))) << 48;
16709 *data |= ((uint64_t)(*(pkt->curr + 2))) << 40;
16710 *data |= ((uint64_t)(*(pkt->curr + 3))) << 32;
16711 *data |= ((uint64_t)(*(pkt->curr + 4))) << 24;
16712 *data |= ((uint64_t)(*(pkt->curr + 5))) << 16;
16713 *data |= ((uint64_t)(*(pkt->curr + 6))) << 8;
16714 *data |= *(pkt->curr + 7);
16715
16716 return 1;
16717 }
16718
16719
16720
16721 static inline int PACKET_get_net_4(PACKET *pkt, unsigned long *data)
16722 {
16723 if (!PACKET_peek_net_4(pkt, data))
16724 return 0;
16725
16726 packet_forward(pkt, 4);
16727
16728 return 1;
16729 }
16730
16731
16732 static inline int PACKET_get_net_4_len(PACKET *pkt, size_t *data)
16733 {
16734 unsigned long i;
16735 int ret = PACKET_get_net_4(pkt, &i);
16736
16737 if (ret)
16738 *data = (size_t)i;
16739
16740 return ret;
16741 }
16742
16743
16744 static inline int PACKET_get_net_8(PACKET *pkt, uint64_t *data)
16745 {
16746 if (!PACKET_peek_net_8(pkt, data))
16747 return 0;
16748
16749 packet_forward(pkt, 8);
16750
16751 return 1;
16752 }
16753
16754
16755 static inline int PACKET_peek_1(const PACKET *pkt,
16756 unsigned int *data)
16757 {
16758 if (!PACKET_remaining(pkt))
16759 return 0;
16760
16761 *data = *pkt->curr;
16762
16763 return 1;
16764 }
16765
16766
16767 static inline int PACKET_get_1(PACKET *pkt, unsigned int *data)
16768 {
16769 if (!PACKET_peek_1(pkt, data))
16770 return 0;
16771
16772 packet_forward(pkt, 1);
16773
16774 return 1;
16775 }
16776
16777
16778 static inline int PACKET_get_1_len(PACKET *pkt, size_t *data)
16779 {
16780 unsigned int i;
16781 int ret = PACKET_get_1(pkt, &i);
16782
16783 if (ret)
16784 *data = (size_t)i;
16785
16786 return ret;
16787 }
16788
16789
16790
16791
16792
16793 static inline int PACKET_peek_4(const PACKET *pkt,
16794 unsigned long *data)
16795 {
16796 if (PACKET_remaining(pkt) < 4)
16797 return 0;
16798
16799 *data = *pkt->curr;
16800 *data |= ((unsigned long)(*(pkt->curr + 1))) << 8;
16801 *data |= ((unsigned long)(*(pkt->curr + 2))) << 16;
16802 *data |= ((unsigned long)(*(pkt->curr + 3))) << 24;
16803
16804 return 1;
16805 }
16806
16807
16808
16809
16810
16811
16812 static inline int PACKET_get_4(PACKET *pkt, unsigned long *data)
16813 {
16814 if (!PACKET_peek_4(pkt, data))
16815 return 0;
16816
16817 packet_forward(pkt, 4);
16818
16819 return 1;
16820 }
16821
16822
16823
16824
16825
16826
16827
16828 static inline int PACKET_peek_bytes(const PACKET *pkt,
16829 const unsigned char **data,
16830 size_t len)
16831 {
16832 if (PACKET_remaining(pkt) < len)
16833 return 0;
16834
16835 *data = pkt->curr;
16836
16837 return 1;
16838 }
16839
16840
16841
16842
16843
16844
16845
16846 static inline int PACKET_get_bytes(PACKET *pkt,
16847 const unsigned char **data,
16848 size_t len)
16849 {
16850 if (!PACKET_peek_bytes(pkt, data, len))
16851 return 0;
16852
16853 packet_forward(pkt, len);
16854
16855 return 1;
16856 }
16857
16858
16859 static inline int PACKET_peek_copy_bytes(const PACKET *pkt,
16860 unsigned char *data,
16861 size_t len)
16862 {
16863 if (PACKET_remaining(pkt) < len)
16864 return 0;
16865
16866 memcpy(data, pkt->curr, len);
16867
16868 return 1;
16869 }
16870
16871
16872
16873
16874
16875 static inline int PACKET_copy_bytes(PACKET *pkt,
16876 unsigned char *data, size_t len)
16877 {
16878 if (!PACKET_peek_copy_bytes(pkt, data, len))
16879 return 0;
16880
16881 packet_forward(pkt, len);
16882
16883 return 1;
16884 }
16885 # 427 "include/internal/packet.h"
16886 static inline int PACKET_copy_all(const PACKET *pkt,
16887 unsigned char *dest,
16888 size_t dest_len, size_t *len)
16889 {
16890 if (PACKET_remaining(pkt) > dest_len) {
16891 *len = 0;
16892 return 0;
16893 }
16894 *len = pkt->remaining;
16895 memcpy(dest, pkt->curr, pkt->remaining);
16896 return 1;
16897 }
16898 # 449 "include/internal/packet.h"
16899 static inline int PACKET_memdup(const PACKET *pkt,
16900 unsigned char **data, size_t *len)
16901 {
16902 size_t length;
16903
16904 CRYPTO_free(*data, "include/internal/packet.h", 454);
16905 *data =
16906 # 455 "include/internal/packet.h" 3 4
16907 ((void *)0)
16908 # 455 "include/internal/packet.h"
16909 ;
16910 *len = 0;
16911
16912 length = PACKET_remaining(pkt);
16913
16914 if (length == 0)
16915 return 1;
16916
16917 *data = CRYPTO_memdup((pkt->curr), length, "include/internal/packet.h", 463);
16918 if (*data ==
16919 # 464 "include/internal/packet.h" 3 4
16920 ((void *)0)
16921 # 464 "include/internal/packet.h"
16922 )
16923 return 0;
16924
16925 *len = length;
16926 return 1;
16927 }
16928 # 481 "include/internal/packet.h"
16929 static inline int PACKET_strndup(const PACKET *pkt, char **data)
16930 {
16931 CRYPTO_free(*data, "include/internal/packet.h", 483);
16932
16933
16934 *data = CRYPTO_strndup((const char *)pkt->curr, PACKET_remaining(pkt), "include/internal/packet.h", 486);
16935 return (*data !=
16936 # 487 "include/internal/packet.h" 3 4
16937 ((void *)0)
16938 # 487 "include/internal/packet.h"
16939 );
16940 }
16941
16942
16943 static inline int PACKET_contains_zero_byte(const PACKET *pkt)
16944 {
16945 return memchr(pkt->curr, 0, pkt->remaining) !=
16946 # 493 "include/internal/packet.h" 3 4
16947 ((void *)0)
16948 # 493 "include/internal/packet.h"
16949 ;
16950 }
16951
16952
16953 static inline int PACKET_forward(PACKET *pkt, size_t len)
16954 {
16955 if (PACKET_remaining(pkt) < len)
16956 return 0;
16957
16958 packet_forward(pkt, len);
16959
16960 return 1;
16961 }
16962 # 514 "include/internal/packet.h"
16963 static inline int PACKET_get_length_prefixed_1(PACKET *pkt,
16964 PACKET *subpkt)
16965 {
16966 unsigned int length;
16967 const unsigned char *data;
16968 PACKET tmp = *pkt;
16969 if (!PACKET_get_1(&tmp, &length) ||
16970 !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
16971 return 0;
16972 }
16973
16974 *pkt = tmp;
16975 subpkt->curr = data;
16976 subpkt->remaining = length;
16977
16978 return 1;
16979 }
16980
16981
16982
16983
16984
16985 static inline int PACKET_as_length_prefixed_1(PACKET *pkt,
16986 PACKET *subpkt)
16987 {
16988 unsigned int length;
16989 const unsigned char *data;
16990 PACKET tmp = *pkt;
16991 if (!PACKET_get_1(&tmp, &length) ||
16992 !PACKET_get_bytes(&tmp, &data, (size_t)length) ||
16993 PACKET_remaining(&tmp) != 0) {
16994 return 0;
16995 }
16996
16997 *pkt = tmp;
16998 subpkt->curr = data;
16999 subpkt->remaining = length;
17000
17001 return 1;
17002 }
17003 # 562 "include/internal/packet.h"
17004 static inline int PACKET_get_length_prefixed_2(PACKET *pkt,
17005 PACKET *subpkt)
17006 {
17007 unsigned int length;
17008 const unsigned char *data;
17009 PACKET tmp = *pkt;
17010
17011 if (!PACKET_get_net_2(&tmp, &length) ||
17012 !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
17013 return 0;
17014 }
17015
17016 *pkt = tmp;
17017 subpkt->curr = data;
17018 subpkt->remaining = length;
17019
17020 return 1;
17021 }
17022
17023
17024
17025
17026
17027 static inline int PACKET_as_length_prefixed_2(PACKET *pkt,
17028 PACKET *subpkt)
17029 {
17030 unsigned int length;
17031 const unsigned char *data;
17032 PACKET tmp = *pkt;
17033
17034 if (!PACKET_get_net_2(&tmp, &length) ||
17035 !PACKET_get_bytes(&tmp, &data, (size_t)length) ||
17036 PACKET_remaining(&tmp) != 0) {
17037 return 0;
17038 }
17039
17040 *pkt = tmp;
17041 subpkt->curr = data;
17042 subpkt->remaining = length;
17043
17044 return 1;
17045 }
17046 # 612 "include/internal/packet.h"
17047 static inline int PACKET_get_length_prefixed_3(PACKET *pkt,
17048 PACKET *subpkt)
17049 {
17050 unsigned long length;
17051 const unsigned char *data;
17052 PACKET tmp = *pkt;
17053 if (!PACKET_get_net_3(&tmp, &length) ||
17054 !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
17055 return 0;
17056 }
17057
17058 *pkt = tmp;
17059 subpkt->curr = data;
17060 subpkt->remaining = length;
17061
17062 return 1;
17063 }
17064
17065
17066
17067 typedef struct wpacket_sub WPACKET_SUB;
17068 struct wpacket_sub {
17069
17070 WPACKET_SUB *parent;
17071
17072
17073
17074
17075
17076 size_t packet_len;
17077
17078
17079 size_t lenbytes;
17080
17081
17082 size_t pwritten;
17083
17084
17085 unsigned int flags;
17086 };
17087
17088 typedef struct wpacket_st WPACKET;
17089 struct wpacket_st {
17090
17091 BUF_MEM *buf;
17092
17093
17094 unsigned char *staticbuf;
17095
17096
17097
17098
17099
17100 size_t curr;
17101
17102
17103 size_t written;
17104
17105
17106 size_t maxsize;
17107
17108
17109 WPACKET_SUB *subs;
17110
17111
17112 unsigned int endfirst : 1;
17113 };
17114 # 703 "include/internal/packet.h"
17115 int WPACKET_init_len(WPACKET *pkt, BUF_MEM *buf, size_t lenbytes);
17116
17117
17118
17119
17120
17121 int WPACKET_init(WPACKET *pkt, BUF_MEM *buf);
17122
17123
17124
17125
17126
17127
17128 int WPACKET_init_null(WPACKET *pkt, size_t lenbytes);
17129
17130
17131
17132
17133
17134 int WPACKET_init_null_der(WPACKET *pkt);
17135
17136
17137
17138
17139
17140
17141 int WPACKET_init_static_len(WPACKET *pkt, unsigned char *buf, size_t len,
17142 size_t lenbytes);
17143
17144
17145
17146
17147
17148
17149 int WPACKET_init_der(WPACKET *pkt, unsigned char *buf, size_t len);
17150
17151
17152
17153
17154 int WPACKET_set_flags(WPACKET *pkt, unsigned int flags);
17155
17156
17157
17158
17159
17160
17161
17162 int WPACKET_close(WPACKET *pkt);
17163
17164
17165
17166
17167
17168 int WPACKET_finish(WPACKET *pkt);
17169 # 765 "include/internal/packet.h"
17170 int WPACKET_fill_lengths(WPACKET *pkt);
17171
17172
17173
17174
17175
17176
17177 int WPACKET_start_sub_packet_len__(WPACKET *pkt, size_t lenbytes);
17178 # 791 "include/internal/packet.h"
17179 int WPACKET_start_sub_packet(WPACKET *pkt);
17180 # 801 "include/internal/packet.h"
17181 int WPACKET_allocate_bytes(WPACKET *pkt, size_t len,
17182 unsigned char **allocbytes);
17183
17184
17185
17186
17187
17188
17189
17190 int WPACKET_sub_allocate_bytes__(WPACKET *pkt, size_t len,
17191 unsigned char **allocbytes, size_t lenbytes);
17192 # 844 "include/internal/packet.h"
17193 int WPACKET_reserve_bytes(WPACKET *pkt, size_t len, unsigned char **allocbytes);
17194
17195
17196
17197
17198 int WPACKET_sub_reserve_bytes__(WPACKET *pkt, size_t len,
17199 unsigned char **allocbytes, size_t lenbytes);
17200 # 871 "include/internal/packet.h"
17201 int WPACKET_put_bytes__(WPACKET *pkt, uint64_t val, size_t bytes);
17202 # 889 "include/internal/packet.h"
17203 int WPACKET_set_max_size(WPACKET *pkt, size_t maxsize);
17204
17205
17206 int WPACKET_memcpy(WPACKET *pkt, const void *src, size_t len);
17207
17208
17209 int WPACKET_memset(WPACKET *pkt, int ch, size_t len);
17210
17211
17212
17213
17214
17215
17216 int WPACKET_sub_memcpy__(WPACKET *pkt, const void *src, size_t len,
17217 size_t lenbytes);
17218 # 919 "include/internal/packet.h"
17219 int WPACKET_get_total_written(WPACKET *pkt, size_t *written);
17220
17221
17222
17223
17224
17225 int WPACKET_get_length(WPACKET *pkt, size_t *len);
17226
17227
17228
17229
17230
17231 unsigned char *WPACKET_get_curr(WPACKET *pkt);
17232
17233
17234 int WPACKET_is_null_buf(WPACKET *pkt);
17235
17236
17237 void WPACKET_cleanup(WPACKET *pkt);
17238 # 33 "ssl/ssl_local.h" 2
17239 # 1 "include/internal/dane.h" 1
17240 # 12 "include/internal/dane.h"
17241
17242 # 43 "include/internal/dane.h"
17243 typedef struct danetls_record_st {
17244 uint8_t usage;
17245 uint8_t selector;
17246 uint8_t mtype;
17247 unsigned char *data;
17248 size_t dlen;
17249 EVP_PKEY *spki;
17250 } danetls_record;
17251
17252 struct stack_st_danetls_record; typedef int (*sk_danetls_record_compfunc)(const danetls_record * const *a, const danetls_record *const *b); typedef void (*sk_danetls_record_freefunc)(danetls_record *a); typedef danetls_record * (*sk_danetls_record_copyfunc)(const danetls_record *a); static __attribute__((unused)) inline int sk_danetls_record_num(const struct stack_st_danetls_record *sk) { return OPENSSL_sk_num((const OPENSSL_STACK *)sk); } static __attribute__((unused)) inline danetls_record *sk_danetls_record_value(const struct stack_st_danetls_record *sk, int idx) { return (danetls_record *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); } static __attribute__((unused)) inline struct stack_st_danetls_record *sk_danetls_record_new(sk_danetls_record_compfunc compare) { return (struct stack_st_danetls_record *)OPENSSL_sk_new((OPENSSL_sk_compfunc)compare); } static __attribute__((unused)) inline struct stack_st_danetls_record *sk_danetls_record_new_null(void) { return (struct stack_st_danetls_record *)OPENSSL_sk_new_null(); } static __attribute__((unused)) inline struct stack_st_danetls_record *sk_danetls_record_new_reserve(sk_danetls_record_compfunc compare, int n) { return (struct stack_st_danetls_record *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); } static __attribute__((unused)) inline int sk_danetls_record_reserve(struct stack_st_danetls_record *sk, int n) { return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n); } static __attribute__((unused)) inline void sk_danetls_record_free(struct stack_st_danetls_record *sk) { OPENSSL_sk_free((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline void sk_danetls_record_zero(struct stack_st_danetls_record *sk) { OPENSSL_sk_zero((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline danetls_record *sk_danetls_record_delete(struct stack_st_danetls_record *sk, int i) { return (danetls_record *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); } static __attribute__((unused)) inline danetls_record *sk_danetls_record_delete_ptr(struct stack_st_danetls_record *sk, danetls_record *ptr) { return (danetls_record *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_danetls_record_push(struct stack_st_danetls_record *sk, danetls_record *ptr) { return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_danetls_record_unshift(struct stack_st_danetls_record *sk, danetls_record *ptr) { return OPENSSL_sk_unshift((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline danetls_record *sk_danetls_record_pop(struct stack_st_danetls_record *sk) { return (danetls_record *)OPENSSL_sk_pop((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline danetls_record *sk_danetls_record_shift(struct stack_st_danetls_record *sk) { return (danetls_record *)OPENSSL_sk_shift((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline void sk_danetls_record_pop_free(struct stack_st_danetls_record *sk, sk_danetls_record_freefunc freefunc) { OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); } static __attribute__((unused)) inline int sk_danetls_record_insert(struct stack_st_danetls_record *sk, danetls_record *ptr, int idx) { return OPENSSL_sk_insert((OPENSSL_STACK *)sk, (const void *)ptr, idx); } static __attribute__((unused)) inline danetls_record *sk_danetls_record_set(struct stack_st_danetls_record *sk, int idx, danetls_record *ptr) { return (danetls_record *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr); } static __attribute__((unused)) inline int sk_danetls_record_find(struct stack_st_danetls_record *sk, danetls_record *ptr) { return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_danetls_record_find_ex(struct stack_st_danetls_record *sk, danetls_record *ptr) { return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_danetls_record_find_all(struct stack_st_danetls_record *sk, danetls_record *ptr, int *pnum) { return OPENSSL_sk_find_all((OPENSSL_STACK *)sk, (const void *)ptr, pnum); } static __attribute__((unused)) inline void sk_danetls_record_sort(struct stack_st_danetls_record *sk) { OPENSSL_sk_sort((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline int sk_danetls_record_is_sorted(const struct stack_st_danetls_record *sk) { return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk); } static __attribute__((unused)) inline struct stack_st_danetls_record * sk_danetls_record_dup(const struct stack_st_danetls_record *sk) { return (struct stack_st_danetls_record *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk); } static __attribute__((unused)) inline struct stack_st_danetls_record *sk_danetls_record_deep_copy(const struct stack_st_danetls_record *sk, sk_danetls_record_copyfunc copyfunc, sk_danetls_record_freefunc freefunc) { return (struct stack_st_danetls_record *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk, (OPENSSL_sk_copyfunc)copyfunc, (OPENSSL_sk_freefunc)freefunc); } static __attribute__((unused)) inline sk_danetls_record_compfunc sk_danetls_record_set_cmp_func(struct stack_st_danetls_record *sk, sk_danetls_record_compfunc compare) { return (sk_danetls_record_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare); }
17253
17254
17255
17256
17257 struct dane_ctx_st {
17258 const EVP_MD **mdevp;
17259 uint8_t *mdord;
17260 uint8_t mdmax;
17261 unsigned long flags;
17262 };
17263
17264
17265
17266
17267 struct ssl_dane_st {
17268 struct dane_ctx_st *dctx;
17269 struct stack_st_danetls_record *trecs;
17270 struct stack_st_X509 *certs;
17271 danetls_record *mtlsa;
17272 X509 *mcert;
17273 uint32_t umask;
17274 int mdpth;
17275 int pdpth;
17276 unsigned long flags;
17277 };
17278 # 34 "ssl/ssl_local.h" 2
17279 # 1 "include/internal/refcount.h" 1
17280 # 11 "include/internal/refcount.h"
17281
17282
17283
17284 # 1 "include/openssl/trace.h" 1
17285 # 12 "include/openssl/trace.h"
17286
17287 # 64 "include/openssl/trace.h"
17288 int OSSL_trace_get_category_num(const char *name);
17289
17290
17291 const char *OSSL_trace_get_category_name(int num);
17292 # 80 "include/openssl/trace.h"
17293 int OSSL_trace_set_channel(int category, BIO* channel);
17294 # 91 "include/openssl/trace.h"
17295 int OSSL_trace_set_prefix(int category, const char *prefix);
17296 int OSSL_trace_set_suffix(int category, const char *suffix);
17297 # 105 "include/openssl/trace.h"
17298 typedef size_t (*OSSL_trace_cb)(const char *buffer, size_t count,
17299 int category, int cmd, void *data);
17300 # 125 "include/openssl/trace.h"
17301 int OSSL_trace_set_callback(int category, OSSL_trace_cb callback, void *data);
17302 # 134 "include/openssl/trace.h"
17303 int OSSL_trace_enabled(int category);
17304 # 153 "include/openssl/trace.h"
17305 BIO *OSSL_trace_begin(int category);
17306 void OSSL_trace_end(int category, BIO *channel);
17307 # 309 "include/openssl/trace.h"
17308 int OSSL_trace_string(BIO *out, int text, int full,
17309 const unsigned char *data, size_t size);
17310 # 15 "include/internal/refcount.h" 2
17311
17312
17313
17314
17315
17316 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdatomic.h" 1 3 4
17317 # 29 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdatomic.h" 3 4
17318
17319 # 29 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdatomic.h" 3 4
17320 typedef enum
17321 {
17322 memory_order_relaxed = 0,
17323 memory_order_consume = 1,
17324 memory_order_acquire = 2,
17325 memory_order_release = 3,
17326 memory_order_acq_rel = 4,
17327 memory_order_seq_cst = 5
17328 } memory_order;
17329
17330
17331 typedef _Atomic _Bool atomic_bool;
17332 typedef _Atomic char atomic_char;
17333 typedef _Atomic signed char atomic_schar;
17334 typedef _Atomic unsigned char atomic_uchar;
17335 typedef _Atomic short atomic_short;
17336 typedef _Atomic unsigned short atomic_ushort;
17337 typedef _Atomic int atomic_int;
17338 typedef _Atomic unsigned int atomic_uint;
17339 typedef _Atomic long atomic_long;
17340 typedef _Atomic unsigned long atomic_ulong;
17341 typedef _Atomic long long atomic_llong;
17342 typedef _Atomic unsigned long long atomic_ullong;
17343
17344
17345
17346 typedef _Atomic short unsigned int atomic_char16_t;
17347 typedef _Atomic unsigned int atomic_char32_t;
17348 typedef _Atomic int atomic_wchar_t;
17349 typedef _Atomic signed char atomic_int_least8_t;
17350 typedef _Atomic unsigned char atomic_uint_least8_t;
17351 typedef _Atomic short int atomic_int_least16_t;
17352 typedef _Atomic short unsigned int atomic_uint_least16_t;
17353 typedef _Atomic int atomic_int_least32_t;
17354 typedef _Atomic unsigned int atomic_uint_least32_t;
17355 typedef _Atomic long int atomic_int_least64_t;
17356 typedef _Atomic long unsigned int atomic_uint_least64_t;
17357 typedef _Atomic signed char atomic_int_fast8_t;
17358 typedef _Atomic unsigned char atomic_uint_fast8_t;
17359 typedef _Atomic long int atomic_int_fast16_t;
17360 typedef _Atomic long unsigned int atomic_uint_fast16_t;
17361 typedef _Atomic long int atomic_int_fast32_t;
17362 typedef _Atomic long unsigned int atomic_uint_fast32_t;
17363 typedef _Atomic long int atomic_int_fast64_t;
17364 typedef _Atomic long unsigned int atomic_uint_fast64_t;
17365 typedef _Atomic long int atomic_intptr_t;
17366 typedef _Atomic long unsigned int atomic_uintptr_t;
17367 typedef _Atomic long unsigned int atomic_size_t;
17368 typedef _Atomic long int atomic_ptrdiff_t;
17369 typedef _Atomic long int atomic_intmax_t;
17370 typedef _Atomic long unsigned int atomic_uintmax_t;
17371 # 97 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdatomic.h" 3 4
17372 extern void atomic_thread_fence (memory_order);
17373
17374 extern void atomic_signal_fence (memory_order);
17375 # 226 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdatomic.h" 3 4
17376 typedef _Atomic struct
17377 {
17378
17379 _Bool __val;
17380
17381
17382
17383 } atomic_flag;
17384
17385
17386
17387
17388 extern _Bool atomic_flag_test_and_set (volatile atomic_flag *);
17389
17390
17391 extern _Bool atomic_flag_test_and_set_explicit (volatile atomic_flag *,
17392 memory_order);
17393
17394
17395
17396 extern void atomic_flag_clear (volatile atomic_flag *);
17397
17398 extern void atomic_flag_clear_explicit (volatile atomic_flag *, memory_order);
17399 # 21 "include/internal/refcount.h" 2
17400 # 29 "include/internal/refcount.h"
17401
17402 # 29 "include/internal/refcount.h"
17403 typedef struct {
17404 _Atomic int val;
17405 } CRYPTO_REF_COUNT;
17406
17407 static inline int CRYPTO_UP_REF(CRYPTO_REF_COUNT *refcnt, int *ret)
17408 {
17409 *ret =
17410 # 35 "include/internal/refcount.h" 3 4
17411 __atomic_fetch_add ((
17412 # 35 "include/internal/refcount.h"
17413 &refcnt->val
17414 # 35 "include/internal/refcount.h" 3 4
17415 ), (
17416 # 35 "include/internal/refcount.h"
17417 1
17418 # 35 "include/internal/refcount.h" 3 4
17419 ), (
17420 # 35 "include/internal/refcount.h"
17421 memory_order_relaxed
17422 # 35 "include/internal/refcount.h" 3 4
17423 ))
17424 # 35 "include/internal/refcount.h"
17425 + 1;
17426 return 1;
17427 }
17428 # 49 "include/internal/refcount.h"
17429 static inline int CRYPTO_DOWN_REF(CRYPTO_REF_COUNT *refcnt, int *ret)
17430 {
17431 *ret =
17432 # 51 "include/internal/refcount.h" 3 4
17433 __atomic_fetch_sub ((
17434 # 51 "include/internal/refcount.h"
17435 &refcnt->val
17436 # 51 "include/internal/refcount.h" 3 4
17437 ), (
17438 # 51 "include/internal/refcount.h"
17439 1
17440 # 51 "include/internal/refcount.h" 3 4
17441 ), (
17442 # 51 "include/internal/refcount.h"
17443 memory_order_relaxed
17444 # 51 "include/internal/refcount.h" 3 4
17445 ))
17446 # 51 "include/internal/refcount.h"
17447 - 1;
17448 if (*ret == 0)
17449
17450 # 53 "include/internal/refcount.h" 3 4
17451 __atomic_thread_fence (
17452 # 53 "include/internal/refcount.h"
17453 memory_order_acquire
17454 # 53 "include/internal/refcount.h" 3 4
17455 )
17456 # 53 "include/internal/refcount.h"
17457 ;
17458 return 1;
17459 }
17460
17461 static inline int CRYPTO_GET_REF(CRYPTO_REF_COUNT *refcnt, int *ret)
17462 {
17463 *ret =
17464 # 59 "include/internal/refcount.h" 3 4
17465 __extension__ ({ __auto_type __atomic_load_ptr = (
17466 # 59 "include/internal/refcount.h"
17467 &refcnt->val
17468 # 59 "include/internal/refcount.h" 3 4
17469 ); __typeof__ ((void)0, *__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, (
17470 # 59 "include/internal/refcount.h"
17471 memory_order_relaxed
17472 # 59 "include/internal/refcount.h" 3 4
17473 )); __atomic_load_tmp; })
17474 # 59 "include/internal/refcount.h"
17475 ;
17476 return 1;
17477 }
17478 # 267 "include/internal/refcount.h"
17479 static __attribute__((unused)) inline int CRYPTO_NEW_REF(CRYPTO_REF_COUNT *refcnt, int n)
17480 {
17481 refcnt->val = n;
17482 return 1;
17483 }
17484
17485 static __attribute__((unused)) inline void CRYPTO_FREE_REF(CRYPTO_REF_COUNT *refcnt)
17486 {
17487 }
17488 # 35 "ssl/ssl_local.h" 2
17489 # 1 "include/internal/tsan_assist.h" 1
17490 # 52 "include/internal/tsan_assist.h"
17491
17492 # 36 "ssl/ssl_local.h" 2
17493 # 1 "include/internal/bio.h" 1
17494 # 12 "include/internal/bio.h"
17495
17496
17497
17498
17499
17500 struct bio_method_st {
17501 int type;
17502 char *name;
17503 int (*bwrite) (BIO *, const char *, size_t, size_t *);
17504 int (*bwrite_old) (BIO *, const char *, int);
17505 int (*bread) (BIO *, char *, size_t, size_t *);
17506 int (*bread_old) (BIO *, char *, int);
17507 int (*bputs) (BIO *, const char *);
17508 int (*bgets) (BIO *, char *, int);
17509 long (*ctrl) (BIO *, int, long, void *);
17510 int (*create) (BIO *);
17511 int (*destroy) (BIO *);
17512 long (*callback_ctrl) (BIO *, int, BIO_info_cb *);
17513 int (*bsendmmsg) (BIO *, BIO_MSG *, size_t, size_t, uint64_t, size_t *);
17514 int (*brecvmmsg) (BIO *, BIO_MSG *, size_t, size_t, uint64_t, size_t *);
17515 };
17516
17517 void bio_free_ex_data(BIO *bio);
17518 void bio_cleanup(void);
17519
17520
17521
17522 int bwrite_conv(BIO *bio, const char *data, size_t datal, size_t *written);
17523 int bread_conv(BIO *bio, char *data, size_t datal, size_t *read);
17524 # 85 "include/internal/bio.h"
17525 OSSL_CORE_BIO *ossl_core_bio_new_from_bio(BIO *bio);
17526 OSSL_CORE_BIO *ossl_core_bio_new_file(const char *filename, const char *mode);
17527 OSSL_CORE_BIO *ossl_core_bio_new_mem_buf(const void *buf, int len);
17528 int ossl_core_bio_read_ex(OSSL_CORE_BIO *cb, void *data, size_t dlen,
17529 size_t *readbytes);
17530 int ossl_core_bio_write_ex(OSSL_CORE_BIO *cb, const void *data, size_t dlen,
17531 size_t *written);
17532 int ossl_core_bio_gets(OSSL_CORE_BIO *cb, char *buf, int size);
17533 int ossl_core_bio_puts(OSSL_CORE_BIO *cb, const char *buf);
17534 long ossl_core_bio_ctrl(OSSL_CORE_BIO *cb, int cmd, long larg, void *parg);
17535 int ossl_core_bio_up_ref(OSSL_CORE_BIO *cb);
17536 int ossl_core_bio_free(OSSL_CORE_BIO *cb);
17537 int ossl_core_bio_vprintf(OSSL_CORE_BIO *cb, const char *format, va_list args);
17538
17539 int ossl_bio_init_core(OSSL_LIB_CTX *libctx, const OSSL_DISPATCH *fns);
17540 # 37 "ssl/ssl_local.h" 2
17541 # 1 "include/internal/ktls.h" 1
17542 # 25 "include/internal/ktls.h"
17543
17544 # 38 "ssl/ssl_local.h" 2
17545 # 1 "include/internal/time.h" 1
17546 # 12 "include/internal/time.h"
17547
17548
17549
17550
17551 # 1 "include/internal/safe_math.h" 1
17552 # 12 "include/internal/safe_math.h"
17553
17554 # 17 "include/internal/time.h" 2
17555 # 25 "include/internal/time.h"
17556 typedef struct {
17557 uint64_t t;
17558 } OSSL_TIME;
17559 # 53 "include/internal/time.h"
17560 static inline __attribute__((unused)) uint64_t safe_add_time(uint64_t a, uint64_t b, int *err) { uint64_t r; if (!__builtin_add_overflow(a, b, &r)) return r; *err |= 1; return a + b; } static inline __attribute__((unused)) uint64_t safe_sub_time(uint64_t a, uint64_t b, int *err) { if (b > a) *err |= 1; return a - b; } static inline __attribute__((unused)) uint64_t safe_mul_time(uint64_t a, uint64_t b, int *err) { uint64_t r; if (!__builtin_mul_overflow(a, b, &r)) return r; *err |= 1; return a * b; } static inline __attribute__((unused)) uint64_t safe_div_time(uint64_t a, uint64_t b, int *err) { if (b != 0) return a / b; *err |= 1; return (~(uint64_t)0); } static inline __attribute__((unused)) uint64_t safe_mod_time(uint64_t a, uint64_t b, int *err) { if (b != 0) return a % b; *err |= 1; return 0; } static inline __attribute__((unused)) uint64_t safe_div_round_up_time (uint64_t a, uint64_t b, int *errp) { uint64_t x; int *err, err_local = 0; err = errp !=
17561 # 53 "include/internal/time.h" 3 4
17562 ((void *)0)
17563 # 53 "include/internal/time.h"
17564 ? errp : &err_local; if (b > 0 && a > 0) { if (a < (~(uint64_t)0) - b) return (a + b - 1) / b; return a / b + (a % b != 0); } if (b == 0) { *err |= 1; return a == 0 ? 0 : (~(uint64_t)0); } if (a == 0) return 0; x = safe_mod_time(a, b, err); return safe_add_time(safe_div_time(a, b, err), x != 0, err); } static inline __attribute__((unused)) uint64_t safe_muldiv_time(uint64_t a, uint64_t b, uint64_t c, int *err) { int e2 = 0; uint64_t x, y; if (c == 0) { *err |= 1; return a == 0 || b == 0 ? 0 : (~(uint64_t)0); } x = safe_mul_time(a, b, &e2); if (!e2) return x / c; if (b > a) { x = b; b = a; a = x; } x = safe_mul_time(a % c, b, err); y = safe_mul_time(a / c, b, err); return safe_add_time(y, x / c, err); } static inline __attribute__((unused)) uint64_t safe_neg_time(uint64_t a, int *err) { if (a == 0) return a; *err |= 1; return 1 + ~a; } static inline __attribute__((unused)) uint64_t safe_abs_time(uint64_t a, int *err) { return a; }
17565
17566
17567 static __attribute__((unused)) inline
17568 OSSL_TIME ossl_ticks2time(uint64_t ticks)
17569 {
17570 OSSL_TIME r;
17571
17572 r.t = ticks;
17573 return r;
17574 }
17575
17576
17577 static __attribute__((unused)) inline
17578 uint64_t ossl_time2ticks(OSSL_TIME t)
17579 {
17580 return t.t;
17581 }
17582
17583
17584 OSSL_TIME ossl_time_now(void);
17585
17586
17587 static __attribute__((unused)) inline
17588 OSSL_TIME ossl_time_zero(void)
17589 {
17590 return ossl_ticks2time(0);
17591 }
17592
17593 static __attribute__((unused)) inline
17594 OSSL_TIME ossl_time_infinite(void)
17595 {
17596 return ossl_ticks2time(~(uint64_t)0);
17597 }
17598
17599
17600
17601 static __attribute__((unused)) inline
17602 struct timeval ossl_time_to_timeval(OSSL_TIME t)
17603 {
17604 struct timeval tv;
17605 int err = 0;
17606
17607
17608
17609
17610
17611 t.t = safe_add_time(t.t, ((((uint64_t)1000000000) / 1000) / 1000) - 1, &err);
17612 if (err)
17613 t = ossl_time_infinite();
17614
17615
17616
17617
17618 tv.tv_sec = (time_t)(t.t / ((uint64_t)1000000000));
17619
17620 tv.tv_usec = (t.t % ((uint64_t)1000000000)) / ((((uint64_t)1000000000) / 1000) / 1000);
17621 return tv;
17622 }
17623
17624
17625 static __attribute__((unused)) inline
17626 OSSL_TIME ossl_time_from_timeval(struct timeval tv)
17627 {
17628 OSSL_TIME t;
17629
17630
17631 if (tv.tv_sec < 0)
17632 return ossl_time_zero();
17633
17634 t.t = tv.tv_sec * ((uint64_t)1000000000) + tv.tv_usec * ((((uint64_t)1000000000) / 1000) / 1000);
17635 return t;
17636 }
17637
17638
17639 static __attribute__((unused)) inline
17640 time_t ossl_time_to_time_t(OSSL_TIME t)
17641 {
17642 return (time_t)(t.t / ((uint64_t)1000000000));
17643 }
17644
17645
17646 static __attribute__((unused)) inline
17647 OSSL_TIME ossl_time_from_time_t(time_t t)
17648 {
17649 OSSL_TIME ot;
17650
17651 ot.t = t;
17652 ot.t *= ((uint64_t)1000000000);
17653 return ot;
17654 }
17655
17656
17657 static __attribute__((unused)) inline
17658 int ossl_time_compare(OSSL_TIME a, OSSL_TIME b)
17659 {
17660 if (a.t > b.t)
17661 return 1;
17662 if (a.t < b.t)
17663 return -1;
17664 return 0;
17665 }
17666
17667
17668 static __attribute__((unused)) inline
17669 int ossl_time_is_zero(OSSL_TIME t)
17670 {
17671 return ossl_time_compare(t, ossl_time_zero()) == 0;
17672 }
17673
17674
17675 static __attribute__((unused)) inline
17676 int ossl_time_is_infinite(OSSL_TIME t)
17677 {
17678 return ossl_time_compare(t, ossl_time_infinite()) == 0;
17679 }
17680
17681 static __attribute__((unused)) inline
17682 OSSL_TIME ossl_time_add(OSSL_TIME a, OSSL_TIME b)
17683 {
17684 OSSL_TIME r;
17685 int err = 0;
17686
17687 r.t = safe_add_time(a.t, b.t, &err);
17688 return err ? ossl_time_infinite() : r;
17689 }
17690
17691 static __attribute__((unused)) inline
17692 OSSL_TIME ossl_time_subtract(OSSL_TIME a, OSSL_TIME b)
17693 {
17694 OSSL_TIME r;
17695 int err = 0;
17696
17697 r.t = safe_sub_time(a.t, b.t, &err);
17698 return err ? ossl_time_zero() : r;
17699 }
17700
17701
17702 static __attribute__((unused)) inline
17703 OSSL_TIME ossl_time_abs_difference(OSSL_TIME a, OSSL_TIME b)
17704 {
17705 return a.t > b.t ? ossl_time_subtract(a, b)
17706 : ossl_time_subtract(b, a);
17707 }
17708
17709 static __attribute__((unused)) inline
17710 OSSL_TIME ossl_time_multiply(OSSL_TIME a, uint64_t b)
17711 {
17712 OSSL_TIME r;
17713 int err = 0;
17714
17715 r.t = safe_mul_time(a.t, b, &err);
17716 return err ? ossl_time_infinite() : r;
17717 }
17718
17719 static __attribute__((unused)) inline
17720 OSSL_TIME ossl_time_divide(OSSL_TIME a, uint64_t b)
17721 {
17722 OSSL_TIME r;
17723 int err = 0;
17724
17725 r.t = safe_div_time(a.t, b, &err);
17726 return err ? ossl_time_zero() : r;
17727 }
17728
17729 static __attribute__((unused)) inline
17730 OSSL_TIME ossl_time_muldiv(OSSL_TIME a, uint64_t b, uint64_t c)
17731 {
17732 OSSL_TIME r;
17733 int err = 0;
17734
17735 r.t = safe_muldiv_time(a.t, b, c, &err);
17736 return err ? ossl_time_zero() : r;
17737 }
17738
17739
17740 static __attribute__((unused)) inline
17741 OSSL_TIME ossl_time_max(OSSL_TIME a, OSSL_TIME b)
17742 {
17743 return a.t > b.t ? a : b;
17744 }
17745
17746
17747 static __attribute__((unused)) inline
17748 OSSL_TIME ossl_time_min(OSSL_TIME a, OSSL_TIME b)
17749 {
17750 return a.t < b.t ? a : b;
17751 }
17752 # 39 "ssl/ssl_local.h" 2
17753 # 1 "include/internal/ssl.h" 1
17754 # 14 "include/internal/ssl.h"
17755
17756
17757 typedef void (*ossl_msg_cb)(int write_p, int version, int content_type,
17758 const void *buf, size_t len, SSL *ssl, void *arg);
17759
17760 int ossl_ssl_get_error(const SSL *s, int i, int check_err);
17761 # 40 "ssl/ssl_local.h" 2
17762 # 1 "ssl/record/record.h" 1
17763 # 22 "ssl/record/record.h"
17764 typedef struct tls_record_st {
17765 void *rechandle;
17766 int version;
17767 uint8_t type;
17768
17769 const unsigned char *data;
17770
17771
17772
17773
17774 unsigned char *allocdata;
17775
17776 size_t length;
17777
17778 size_t off;
17779
17780 uint16_t epoch;
17781
17782 unsigned char seq_num[8];
17783
17784
17785
17786 } TLS_RECORD;
17787
17788 typedef struct dtls_record_layer_st {
17789
17790
17791
17792
17793
17794 uint16_t r_epoch;
17795 uint16_t w_epoch;
17796
17797
17798
17799
17800
17801
17802 struct pqueue_st *buffered_app_data;
17803 } DTLS_RECORD_LAYER;
17804 # 71 "ssl/record/record.h"
17805 typedef struct record_layer_st {
17806
17807 SSL_CONNECTION *s;
17808
17809
17810 const OSSL_RECORD_METHOD *custom_rlmethod;
17811
17812 void *rlarg;
17813
17814 const OSSL_RECORD_METHOD *rrlmethod;
17815
17816 const OSSL_RECORD_METHOD *wrlmethod;
17817
17818 OSSL_RECORD_LAYER *rrl;
17819
17820 OSSL_RECORD_LAYER *wrl;
17821
17822 BIO *rrlnext;
17823
17824 size_t default_read_buf_len;
17825
17826
17827
17828
17829
17830 int read_ahead;
17831
17832
17833 size_t wnum;
17834 unsigned char handshake_fragment[4];
17835 size_t handshake_fragment_len;
17836
17837
17838 size_t wpend_tot;
17839 uint8_t wpend_type;
17840 const unsigned char *wpend_buf;
17841
17842
17843 unsigned int alert_count;
17844 DTLS_RECORD_LAYER *d;
17845
17846
17847 size_t (*record_padding_cb)(SSL *s, int type, size_t len, void *arg);
17848 void *record_padding_arg;
17849 size_t block_padding;
17850
17851
17852 size_t num_recs;
17853
17854 size_t curr_rec;
17855
17856 TLS_RECORD tlsrecs[32];
17857
17858 } RECORD_LAYER;
17859 # 136 "ssl/record/record.h"
17860 void RECORD_LAYER_init(RECORD_LAYER *rl, SSL_CONNECTION *s);
17861 int RECORD_LAYER_clear(RECORD_LAYER *rl);
17862 int RECORD_LAYER_reset(RECORD_LAYER *rl);
17863 int RECORD_LAYER_read_pending(const RECORD_LAYER *rl);
17864 int RECORD_LAYER_processed_read_pending(const RECORD_LAYER *rl);
17865 int RECORD_LAYER_write_pending(const RECORD_LAYER *rl);
17866 int RECORD_LAYER_is_sslv2_record(RECORD_LAYER *rl);
17867 size_t ssl3_pending(const SSL *s);
17868 int ssl3_write_bytes(SSL *s, uint8_t type, const void *buf, size_t len,
17869 size_t *written);
17870 int ssl3_read_bytes(SSL *s, uint8_t type, uint8_t *recvd_type,
17871 unsigned char *buf, size_t len, int peek,
17872 size_t *readbytes);
17873
17874 int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl);
17875 void DTLS_RECORD_LAYER_free(RECORD_LAYER *rl);
17876 void DTLS_RECORD_LAYER_clear(RECORD_LAYER *rl);
17877 int dtls1_read_bytes(SSL *s, uint8_t type, uint8_t *recvd_type,
17878 unsigned char *buf, size_t len, int peek,
17879 size_t *readbytes);
17880 int dtls1_write_bytes(SSL_CONNECTION *s, uint8_t type, const void *buf,
17881 size_t len, size_t *written);
17882 int do_dtls1_write(SSL_CONNECTION *s, uint8_t type, const unsigned char *buf,
17883 size_t len, size_t *written);
17884 void dtls1_increment_epoch(SSL_CONNECTION *s, int rw);
17885 uint16_t dtls1_get_epoch(SSL_CONNECTION *s, int rw);
17886 int ssl_release_record(SSL_CONNECTION *s, TLS_RECORD *rr, size_t length);
17887
17888
17889
17890
17891
17892
17893
17894 int ossl_tls_handle_rlayer_return(SSL_CONNECTION *s, int writing, int ret,
17895 char *file, int line);
17896
17897 int ssl_set_new_record_layer(SSL_CONNECTION *s, int version,
17898 int direction, int level,
17899 unsigned char *secret, size_t secretlen,
17900 unsigned char *key, size_t keylen,
17901 unsigned char *iv, size_t ivlen,
17902 unsigned char *mackey, size_t mackeylen,
17903 const EVP_CIPHER *ciph, size_t taglen,
17904 int mactype, const EVP_MD *md,
17905 const SSL_COMP *comp, const EVP_MD *kdfdigest);
17906 int ssl_set_record_protocol_version(SSL_CONNECTION *s, int vers);
17907
17908
17909 typedef int (OSSL_FUNC_rlayer_skip_early_data_fn)(void *cbarg); static __attribute__((unused)) inline OSSL_FUNC_rlayer_skip_early_data_fn *OSSL_FUNC_rlayer_skip_early_data(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rlayer_skip_early_data_fn *)opf->function; }
17910
17911 typedef void (OSSL_FUNC_rlayer_msg_callback_fn)(int write_p, int version, int content_type, const void *buf, size_t len, void *cbarg); static __attribute__((unused)) inline OSSL_FUNC_rlayer_msg_callback_fn *OSSL_FUNC_rlayer_msg_callback(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rlayer_msg_callback_fn *)opf->function; }
17912
17913
17914
17915
17916 typedef int (OSSL_FUNC_rlayer_security_fn)(void *cbarg, int op, int bits, int nid, void *other); static __attribute__((unused)) inline OSSL_FUNC_rlayer_security_fn *OSSL_FUNC_rlayer_security(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rlayer_security_fn *)opf->function; }
17917
17918
17919 typedef size_t (OSSL_FUNC_rlayer_padding_fn)(void *cbarg, int type, size_t len); static __attribute__((unused)) inline OSSL_FUNC_rlayer_padding_fn *OSSL_FUNC_rlayer_padding(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rlayer_padding_fn *)opf->function; }
17920 # 41 "ssl/ssl_local.h" 2
17921 # 386 "ssl/ssl_local.h"
17922 typedef enum {
17923 SSL_PHA_NONE = 0,
17924 SSL_PHA_EXT_SENT,
17925 SSL_PHA_EXT_RECEIVED,
17926 SSL_PHA_REQUEST_PENDING,
17927 SSL_PHA_REQUESTED
17928 } SSL_PHA_STATE;
17929
17930
17931
17932
17933 struct ssl_cipher_st {
17934 uint32_t valid;
17935 const char *name;
17936 const char *stdname;
17937 uint32_t id;
17938
17939
17940
17941
17942 uint32_t algorithm_mkey;
17943 uint32_t algorithm_auth;
17944 uint32_t algorithm_enc;
17945 uint32_t algorithm_mac;
17946 int min_tls;
17947 int max_tls;
17948 int min_dtls;
17949 int max_dtls;
17950 uint32_t algo_strength;
17951 uint32_t algorithm2;
17952 int32_t strength_bits;
17953 uint32_t alg_bits;
17954 };
17955
17956
17957 struct ssl_method_st {
17958 int version;
17959 unsigned flags;
17960 unsigned long mask;
17961 SSL *(*ssl_new) (SSL_CTX *ctx);
17962 void (*ssl_free) (SSL *s);
17963 int (*ssl_reset) (SSL *s);
17964 int (*ssl_init) (SSL *s);
17965 int (*ssl_clear) (SSL *s);
17966 void (*ssl_deinit) (SSL *s);
17967 int (*ssl_accept) (SSL *s);
17968 int (*ssl_connect) (SSL *s);
17969 int (*ssl_read) (SSL *s, void *buf, size_t len, size_t *readbytes);
17970 int (*ssl_peek) (SSL *s, void *buf, size_t len, size_t *readbytes);
17971 int (*ssl_write) (SSL *s, const void *buf, size_t len, size_t *written);
17972 int (*ssl_shutdown) (SSL *s);
17973 int (*ssl_renegotiate) (SSL *s);
17974 int (*ssl_renegotiate_check) (SSL *s, int);
17975 int (*ssl_read_bytes) (SSL *s, uint8_t type, uint8_t *recvd_type,
17976 unsigned char *buf, size_t len, int peek,
17977 size_t *readbytes);
17978 int (*ssl_write_bytes) (SSL *s, uint8_t type, const void *buf_, size_t len,
17979 size_t *written);
17980 int (*ssl_dispatch_alert) (SSL *s);
17981 long (*ssl_ctrl) (SSL *s, int cmd, long larg, void *parg);
17982 long (*ssl_ctx_ctrl) (SSL_CTX *ctx, int cmd, long larg, void *parg);
17983 const SSL_CIPHER *(*get_cipher_by_char) (const unsigned char *ptr);
17984 int (*put_cipher_by_char) (const SSL_CIPHER *cipher, WPACKET *pkt,
17985 size_t *len);
17986 size_t (*ssl_pending) (const SSL *s);
17987 int (*num_ciphers) (void);
17988 const SSL_CIPHER *(*get_cipher) (unsigned ncipher);
17989 OSSL_TIME (*get_timeout) (void);
17990 const struct ssl3_enc_method *ssl3_enc;
17991 int (*ssl_version) (void);
17992 long (*ssl_callback_ctrl) (SSL *s, int cb_id, void (*fp) (void));
17993 long (*ssl_ctx_callback_ctrl) (SSL_CTX *s, int cb_id, void (*fp) (void));
17994 };
17995 # 492 "ssl/ssl_local.h"
17996 struct ssl_session_st {
17997 int ssl_version;
17998
17999 size_t master_key_length;
18000
18001
18002 unsigned char early_secret[64];
18003
18004
18005
18006
18007 unsigned char master_key[512];
18008
18009 size_t session_id_length;
18010 unsigned char session_id[32];
18011
18012
18013
18014
18015
18016 size_t sid_ctx_length;
18017 unsigned char sid_ctx[32];
18018
18019 char *psk_identity_hint;
18020 char *psk_identity;
18021
18022
18023
18024
18025
18026
18027 int not_resumable;
18028
18029 EVP_PKEY *peer_rpk;
18030
18031 X509 *peer;
18032
18033 struct stack_st_X509 *peer_chain;
18034
18035
18036
18037
18038 long verify_result;
18039 CRYPTO_REF_COUNT references;
18040 OSSL_TIME timeout;
18041 OSSL_TIME time;
18042 OSSL_TIME calc_timeout;
18043 unsigned int compress_meth;
18044 const SSL_CIPHER *cipher;
18045 unsigned long cipher_id;
18046
18047 unsigned int kex_group;
18048 CRYPTO_EX_DATA ex_data;
18049
18050
18051
18052
18053 struct ssl_session_st *prev, *next;
18054
18055 struct {
18056 char *hostname;
18057
18058 unsigned char *tick;
18059 size_t ticklen;
18060
18061 unsigned long tick_lifetime_hint;
18062 uint32_t tick_age_add;
18063
18064 uint32_t max_early_data;
18065
18066 unsigned char *alpn_selected;
18067 size_t alpn_selected_len;
18068
18069
18070
18071
18072
18073
18074 uint8_t max_fragment_len_mode;
18075 } ext;
18076
18077 char *srp_username;
18078
18079 unsigned char *ticket_appdata;
18080 size_t ticket_appdata_len;
18081 uint32_t flags;
18082 SSL_CTX *owner;
18083 };
18084
18085
18086
18087
18088
18089
18090 typedef struct srp_ctx_st {
18091
18092 void *SRP_cb_arg;
18093
18094 int (*TLS_ext_srp_username_callback) (SSL *, int *, void *);
18095
18096 int (*SRP_verify_param_callback) (SSL *, void *);
18097
18098 char *(*SRP_give_srp_client_pwd_callback) (SSL *, void *);
18099 char *login;
18100 BIGNUM *N, *g, *s, *B, *A;
18101 BIGNUM *a, *b, *v;
18102 char *info;
18103 int strength;
18104 unsigned long srp_Mask;
18105 } SRP_CTX;
18106
18107
18108
18109 typedef enum {
18110 SSL_EARLY_DATA_NONE = 0,
18111 SSL_EARLY_DATA_CONNECT_RETRY,
18112 SSL_EARLY_DATA_CONNECTING,
18113 SSL_EARLY_DATA_WRITE_RETRY,
18114 SSL_EARLY_DATA_WRITING,
18115 SSL_EARLY_DATA_WRITE_FLUSH,
18116 SSL_EARLY_DATA_UNAUTH_WRITING,
18117 SSL_EARLY_DATA_FINISHED_WRITING,
18118 SSL_EARLY_DATA_ACCEPT_RETRY,
18119 SSL_EARLY_DATA_ACCEPTING,
18120 SSL_EARLY_DATA_READ_RETRY,
18121 SSL_EARLY_DATA_READING,
18122 SSL_EARLY_DATA_FINISHED_READING
18123 } SSL_EARLY_DATA_STATE;
18124 # 643 "ssl/ssl_local.h"
18125 struct ssl_comp_st {
18126 int id;
18127 const char *name;
18128 COMP_METHOD *method;
18129 };
18130
18131 typedef struct raw_extension_st {
18132
18133 PACKET data;
18134
18135 int present;
18136
18137 int parsed;
18138
18139 unsigned int type;
18140
18141 size_t received_order;
18142 } RAW_EXTENSION;
18143
18144 typedef struct {
18145 unsigned int isv2;
18146 unsigned int legacy_version;
18147 unsigned char random[32];
18148 size_t session_id_len;
18149 unsigned char session_id[32];
18150 size_t dtls_cookie_len;
18151 unsigned char dtls_cookie[255];
18152 PACKET ciphersuites;
18153 size_t compressions_len;
18154 unsigned char compressions[255];
18155 PACKET extensions;
18156 size_t pre_proc_exts_len;
18157 RAW_EXTENSION *pre_proc_exts;
18158 } CLIENTHELLO_MSG;
18159
18160
18161
18162
18163
18164 typedef enum tlsext_index_en {
18165 TLSEXT_IDX_renegotiate,
18166 TLSEXT_IDX_server_name,
18167 TLSEXT_IDX_max_fragment_length,
18168 TLSEXT_IDX_srp,
18169 TLSEXT_IDX_ec_point_formats,
18170 TLSEXT_IDX_supported_groups,
18171 TLSEXT_IDX_session_ticket,
18172 TLSEXT_IDX_status_request,
18173 TLSEXT_IDX_next_proto_neg,
18174 TLSEXT_IDX_application_layer_protocol_negotiation,
18175 TLSEXT_IDX_use_srtp,
18176 TLSEXT_IDX_encrypt_then_mac,
18177 TLSEXT_IDX_signed_certificate_timestamp,
18178 TLSEXT_IDX_extended_master_secret,
18179 TLSEXT_IDX_signature_algorithms_cert,
18180 TLSEXT_IDX_post_handshake_auth,
18181 TLSEXT_IDX_client_cert_type,
18182 TLSEXT_IDX_server_cert_type,
18183 TLSEXT_IDX_signature_algorithms,
18184 TLSEXT_IDX_supported_versions,
18185 TLSEXT_IDX_psk_kex_modes,
18186 TLSEXT_IDX_key_share,
18187 TLSEXT_IDX_cookie,
18188 TLSEXT_IDX_cryptopro_bug,
18189 TLSEXT_IDX_compress_certificate,
18190 TLSEXT_IDX_early_data,
18191 TLSEXT_IDX_certificate_authorities,
18192 TLSEXT_IDX_padding,
18193 TLSEXT_IDX_psk,
18194
18195 TLSEXT_IDX_num_builtins
18196 } TLSEXT_INDEX;
18197
18198 struct lhash_st_SSL_SESSION { union lh_SSL_SESSION_dummy { void* d1; unsigned long d2; int d3; } dummy; }; static unsigned long lh_SSL_SESSION_hfn_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) { unsigned long (*hfn_conv)(const SSL_SESSION *) = (unsigned long (*)(const SSL_SESSION *))hfn; return hfn_conv((const SSL_SESSION *)data); } static int lh_SSL_SESSION_cfn_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) { int (*cfn_conv)(const SSL_SESSION *, const SSL_SESSION *) = (int (*)(const SSL_SESSION *, const SSL_SESSION *))cfn; return cfn_conv((const SSL_SESSION *)da, (const SSL_SESSION *)db); } static __attribute__((unused)) inline void lh_SSL_SESSION_free(struct lhash_st_SSL_SESSION *lh) { OPENSSL_LH_free((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline void lh_SSL_SESSION_flush(struct lhash_st_SSL_SESSION *lh) { OPENSSL_LH_flush((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline SSL_SESSION * lh_SSL_SESSION_insert(struct lhash_st_SSL_SESSION *lh, SSL_SESSION *d) { return (SSL_SESSION *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline SSL_SESSION * lh_SSL_SESSION_delete(struct lhash_st_SSL_SESSION *lh, const SSL_SESSION *d) { return (SSL_SESSION *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline SSL_SESSION * lh_SSL_SESSION_retrieve(struct lhash_st_SSL_SESSION *lh, const SSL_SESSION *d) { return (SSL_SESSION *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline int lh_SSL_SESSION_error(struct lhash_st_SSL_SESSION *lh) { return OPENSSL_LH_error((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline unsigned long lh_SSL_SESSION_num_items(struct lhash_st_SSL_SESSION *lh) { return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline unsigned long lh_SSL_SESSION_get_down_load(struct lhash_st_SSL_SESSION *lh) { return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline void lh_SSL_SESSION_set_down_load(struct lhash_st_SSL_SESSION *lh, unsigned long dl) { OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl); } static __attribute__((unused)) inline void lh_SSL_SESSION_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) { void (*doall_conv)(SSL_SESSION *) = (void (*)(SSL_SESSION *))doall; doall_conv((SSL_SESSION *)node); } static __attribute__((unused)) inline void lh_SSL_SESSION_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) { void (*doall_conv)(SSL_SESSION *, void *) = (void (*)(SSL_SESSION *, void *))doall; doall_conv((SSL_SESSION *)node, arg); } static __attribute__((unused)) inline void lh_SSL_SESSION_doall(struct lhash_st_SSL_SESSION *lh, void (*doall)(SSL_SESSION *)) { OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); } static __attribute__((unused)) inline struct lhash_st_SSL_SESSION * lh_SSL_SESSION_new(unsigned long (*hfn)(const SSL_SESSION *), int (*cfn)(const SSL_SESSION *, const SSL_SESSION *)) { return (struct lhash_st_SSL_SESSION *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), lh_SSL_SESSION_hfn_thunk, lh_SSL_SESSION_cfn_thunk, lh_SSL_SESSION_doall_thunk, lh_SSL_SESSION_doall_arg_thunk); } static __attribute__((unused)) inline void lh_SSL_SESSION_doall_arg(struct lhash_st_SSL_SESSION *lh, void (*doallarg)(SSL_SESSION *, void *), void *arg) { OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNCARG)doallarg, arg); } struct lhash_st_SSL_SESSION;
18199
18200 struct lhash_st_X509_NAME { union lh_X509_NAME_dummy { void* d1; unsigned long d2; int d3; } dummy; }; static unsigned long lh_X509_NAME_hfn_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) { unsigned long (*hfn_conv)(const X509_NAME *) = (unsigned long (*)(const X509_NAME *))hfn; return hfn_conv((const X509_NAME *)data); } static int lh_X509_NAME_cfn_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) { int (*cfn_conv)(const X509_NAME *, const X509_NAME *) = (int (*)(const X509_NAME *, const X509_NAME *))cfn; return cfn_conv((const X509_NAME *)da, (const X509_NAME *)db); } static __attribute__((unused)) inline void lh_X509_NAME_free(struct lhash_st_X509_NAME *lh) { OPENSSL_LH_free((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline void lh_X509_NAME_flush(struct lhash_st_X509_NAME *lh) { OPENSSL_LH_flush((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline X509_NAME * lh_X509_NAME_insert(struct lhash_st_X509_NAME *lh, X509_NAME *d) { return (X509_NAME *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline X509_NAME * lh_X509_NAME_delete(struct lhash_st_X509_NAME *lh, const X509_NAME *d) { return (X509_NAME *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline X509_NAME * lh_X509_NAME_retrieve(struct lhash_st_X509_NAME *lh, const X509_NAME *d) { return (X509_NAME *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline int lh_X509_NAME_error(struct lhash_st_X509_NAME *lh) { return OPENSSL_LH_error((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline unsigned long lh_X509_NAME_num_items(struct lhash_st_X509_NAME *lh) { return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline unsigned long lh_X509_NAME_get_down_load(struct lhash_st_X509_NAME *lh) { return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline void lh_X509_NAME_set_down_load(struct lhash_st_X509_NAME *lh, unsigned long dl) { OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl); } static __attribute__((unused)) inline void lh_X509_NAME_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) { void (*doall_conv)(X509_NAME *) = (void (*)(X509_NAME *))doall; doall_conv((X509_NAME *)node); } static __attribute__((unused)) inline void lh_X509_NAME_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) { void (*doall_conv)(X509_NAME *, void *) = (void (*)(X509_NAME *, void *))doall; doall_conv((X509_NAME *)node, arg); } static __attribute__((unused)) inline void lh_X509_NAME_doall(struct lhash_st_X509_NAME *lh, void (*doall)(X509_NAME *)) { OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); } static __attribute__((unused)) inline struct lhash_st_X509_NAME * lh_X509_NAME_new(unsigned long (*hfn)(const X509_NAME *), int (*cfn)(const X509_NAME *, const X509_NAME *)) { return (struct lhash_st_X509_NAME *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), lh_X509_NAME_hfn_thunk, lh_X509_NAME_cfn_thunk, lh_X509_NAME_doall_thunk, lh_X509_NAME_doall_arg_thunk); } static __attribute__((unused)) inline void lh_X509_NAME_doall_arg(struct lhash_st_X509_NAME *lh, void (*doallarg)(X509_NAME *, void *), void *arg) { OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNCARG)doallarg, arg); } struct lhash_st_X509_NAME;
18201
18202
18203
18204
18205 typedef struct ssl_ctx_ext_secure_st {
18206 unsigned char tick_hmac_key[32];
18207 unsigned char tick_aes_key[32];
18208 } SSL_CTX_EXT_SECURE;
18209 # 735 "ssl/ssl_local.h"
18210 typedef struct ssl_hmac_st {
18211 EVP_MAC_CTX *ctx;
18212
18213 HMAC_CTX *old_ctx;
18214
18215 } SSL_HMAC;
18216
18217 SSL_HMAC *ssl_hmac_new(const SSL_CTX *ctx);
18218 void ssl_hmac_free(SSL_HMAC *ctx);
18219
18220 HMAC_CTX *ssl_hmac_get0_HMAC_CTX(SSL_HMAC *ctx);
18221
18222 EVP_MAC_CTX *ssl_hmac_get0_EVP_MAC_CTX(SSL_HMAC *ctx);
18223 int ssl_hmac_init(SSL_HMAC *ctx, void *key, size_t len, char *md);
18224 int ssl_hmac_update(SSL_HMAC *ctx, const unsigned char *data, size_t len);
18225 int ssl_hmac_final(SSL_HMAC *ctx, unsigned char *md, size_t *len,
18226 size_t max_size);
18227 size_t ssl_hmac_size(const SSL_HMAC *ctx);
18228
18229 int ssl_get_EC_curve_nid(const EVP_PKEY *pkey);
18230 int tls13_set_encoded_pub_key(EVP_PKEY *pkey,
18231 const unsigned char *enckey,
18232 size_t enckeylen);
18233
18234 typedef struct tls_group_info_st {
18235 char *tlsname;
18236 char *realname;
18237 char *algorithm;
18238 unsigned int secbits;
18239 uint16_t group_id;
18240 int mintls;
18241 int maxtls;
18242 int mindtls;
18243 int maxdtls;
18244 char is_kem;
18245 } TLS_GROUP_INFO;
18246
18247 typedef struct tls_sigalg_info_st {
18248 char *name;
18249 uint16_t code_point;
18250 char *sigalg_name;
18251 char *sigalg_oid;
18252 char *sig_name;
18253 char *sig_oid;
18254 char *hash_name;
18255 char *hash_oid;
18256 char *keytype;
18257 char *keytype_oid;
18258 unsigned int secbits;
18259 int mintls;
18260 int maxtls;
18261 } TLS_SIGALG_INFO;
18262
18263
18264
18265
18266
18267 typedef struct {
18268 int nid;
18269 uint32_t amask;
18270 } SSL_CERT_LOOKUP;
18271 # 807 "ssl/ssl_local.h"
18272 struct ssl_ctx_st {
18273 OSSL_LIB_CTX *libctx;
18274
18275 const SSL_METHOD *method;
18276 struct stack_st_SSL_CIPHER *cipher_list;
18277
18278 struct stack_st_SSL_CIPHER *cipher_list_by_id;
18279
18280 struct stack_st_SSL_CIPHER *tls13_ciphersuites;
18281 struct x509_store_st *cert_store;
18282 struct lhash_st_SSL_SESSION *sessions;
18283
18284
18285
18286
18287 size_t session_cache_size;
18288 struct ssl_session_st *session_cache_head;
18289 struct ssl_session_st *session_cache_tail;
18290
18291
18292
18293
18294
18295 uint32_t session_cache_mode;
18296
18297
18298
18299
18300
18301 OSSL_TIME session_timeout;
18302 # 846 "ssl/ssl_local.h"
18303 int (*new_session_cb) (struct ssl_st *ssl, SSL_SESSION *sess);
18304 void (*remove_session_cb) (struct ssl_ctx_st *ctx, SSL_SESSION *sess);
18305 SSL_SESSION *(*get_session_cb) (struct ssl_st *ssl,
18306 const unsigned char *data, int len,
18307 int *copy);
18308 struct {
18309 _Atomic int sess_connect;
18310 _Atomic int sess_connect_renegotiate;
18311 _Atomic int sess_connect_good;
18312 _Atomic int sess_accept;
18313 _Atomic int sess_accept_renegotiate;
18314 _Atomic int sess_accept_good;
18315 _Atomic int sess_miss;
18316 _Atomic int sess_timeout;
18317 _Atomic int sess_cache_full;
18318 _Atomic int sess_hit;
18319 _Atomic int sess_cb_hit;
18320
18321
18322
18323
18324
18325
18326 } stats;
18327
18328
18329
18330
18331 CRYPTO_REF_COUNT references;
18332
18333
18334 int (*app_verify_callback) (X509_STORE_CTX *, void *);
18335 void *app_verify_arg;
18336
18337
18338
18339
18340
18341
18342 pem_password_cb *default_passwd_callback;
18343
18344
18345 void *default_passwd_callback_userdata;
18346
18347
18348 int (*client_cert_cb) (SSL *ssl, X509 **x509, EVP_PKEY **pkey);
18349
18350
18351 int (*app_gen_cookie_cb) (SSL *ssl, unsigned char *cookie,
18352 unsigned int *cookie_len);
18353
18354
18355 int (*app_verify_cookie_cb) (SSL *ssl, const unsigned char *cookie,
18356 unsigned int cookie_len);
18357
18358
18359 int (*gen_stateless_cookie_cb) (SSL *ssl, unsigned char *cookie,
18360 size_t *cookie_len);
18361
18362
18363 int (*verify_stateless_cookie_cb) (SSL *ssl, const unsigned char *cookie,
18364 size_t cookie_len);
18365
18366 CRYPTO_EX_DATA ex_data;
18367
18368 const EVP_MD *md5;
18369 const EVP_MD *sha1;
18370
18371 struct stack_st_X509 *extra_certs;
18372 struct stack_st_SSL_COMP *comp_methods;
18373
18374
18375
18376
18377 void (*info_callback) (const SSL *ssl, int type, int val);
18378
18379
18380
18381
18382
18383
18384
18385 struct stack_st_X509_NAME *ca_names;
18386 struct stack_st_X509_NAME *client_ca_names;
18387
18388
18389
18390
18391
18392
18393 uint64_t options;
18394 uint32_t mode;
18395 int min_proto_version;
18396 int max_proto_version;
18397 size_t max_cert_list;
18398
18399 struct cert_st *cert;
18400 SSL_CERT_LOOKUP *ssl_cert_info;
18401 int read_ahead;
18402
18403
18404 ossl_msg_cb msg_callback;
18405 void *msg_callback_arg;
18406
18407 uint32_t verify_mode;
18408 size_t sid_ctx_length;
18409 unsigned char sid_ctx[32];
18410
18411 int (*default_verify_callback) (int ok, X509_STORE_CTX *ctx);
18412
18413
18414 GEN_SESSION_CB generate_session_id;
18415
18416 X509_VERIFY_PARAM *param;
18417
18418 int quiet_shutdown;
18419
18420
18421 CTLOG_STORE *ctlog_store;
18422
18423
18424
18425
18426 ssl_ct_validation_cb ct_validation_callback;
18427 void *ct_validation_callback_arg;
18428
18429
18430
18431
18432
18433
18434 size_t split_send_fragment;
18435
18436
18437
18438
18439 size_t max_send_fragment;
18440
18441
18442 size_t max_pipelines;
18443
18444
18445 size_t default_read_buf_len;
18446
18447
18448
18449
18450
18451 ENGINE *client_cert_engine;
18452
18453
18454
18455 SSL_client_hello_cb_fn client_hello_cb;
18456 void *client_hello_cb_arg;
18457
18458
18459 struct {
18460
18461 int (*servername_cb) (SSL *, int *, void *);
18462 void *servername_arg;
18463
18464 unsigned char tick_key_name[16];
18465 SSL_CTX_EXT_SECURE *secure;
18466
18467
18468 int (*ticket_key_cb) (SSL *ssl,
18469 unsigned char *name, unsigned char *iv,
18470 EVP_CIPHER_CTX *ectx, HMAC_CTX *hctx, int enc);
18471
18472 int (*ticket_key_evp_cb) (SSL *ssl,
18473 unsigned char *name, unsigned char *iv,
18474 EVP_CIPHER_CTX *ectx, EVP_MAC_CTX *hctx,
18475 int enc);
18476
18477
18478
18479 int (*status_cb) (SSL *ssl, void *arg);
18480 void *status_arg;
18481
18482 int status_type;
18483
18484 uint8_t max_fragment_len_mode;
18485
18486
18487 size_t ecpointformats_len;
18488 unsigned char *ecpointformats;
18489
18490 size_t supportedgroups_len;
18491 uint16_t *supportedgroups;
18492
18493 uint16_t *supported_groups_default;
18494 size_t supported_groups_default_len;
18495 # 1053 "ssl/ssl_local.h"
18496 int (*alpn_select_cb) (SSL *s,
18497 const unsigned char **out,
18498 unsigned char *outlen,
18499 const unsigned char *in,
18500 unsigned int inlen, void *arg);
18501 void *alpn_select_cb_arg;
18502
18503
18504
18505
18506
18507 unsigned char *alpn;
18508 size_t alpn_len;
18509 # 1074 "ssl/ssl_local.h"
18510 SSL_CTX_npn_advertised_cb_func npn_advertised_cb;
18511 void *npn_advertised_cb_arg;
18512
18513
18514
18515
18516 SSL_CTX_npn_select_cb_func npn_select_cb;
18517 void *npn_select_cb_arg;
18518
18519
18520 unsigned char cookie_hmac_key[32];
18521 } ext;
18522
18523
18524 SSL_psk_client_cb_func psk_client_callback;
18525 SSL_psk_server_cb_func psk_server_callback;
18526
18527 SSL_psk_find_session_cb_func psk_find_session_cb;
18528 SSL_psk_use_session_cb_func psk_use_session_cb;
18529
18530
18531 SRP_CTX srp_ctx;
18532
18533
18534
18535 struct dane_ctx_st dane;
18536
18537
18538
18539 struct stack_st_SRTP_PROTECTION_PROFILE *srtp_profiles;
18540
18541
18542
18543
18544
18545 int (*not_resumable_session_cb) (SSL *ssl, int is_forward_secure);
18546
18547 CRYPTO_RWLOCK *lock;
18548
18549
18550
18551
18552
18553 SSL_CTX_keylog_cb_func keylog_callback;
18554
18555
18556
18557
18558
18559 uint32_t max_early_data;
18560
18561
18562
18563
18564
18565 uint32_t recv_max_early_data;
18566
18567
18568 size_t (*record_padding_cb)(SSL *s, int type, size_t len, void *arg);
18569 void *record_padding_arg;
18570 size_t block_padding;
18571
18572
18573 SSL_CTX_generate_session_ticket_fn generate_ticket_cb;
18574 SSL_CTX_decrypt_session_ticket_fn decrypt_ticket_cb;
18575 void *ticket_cb_data;
18576
18577
18578 size_t num_tickets;
18579
18580
18581 SSL_allow_early_data_cb_fn allow_early_data_cb;
18582 void *allow_early_data_cb_data;
18583
18584
18585 int pha_enabled;
18586
18587
18588 SSL_async_callback_fn async_cb;
18589 void *async_cb_arg;
18590
18591 char *propq;
18592
18593 int ssl_mac_pkey_id[14];
18594 const EVP_CIPHER *ssl_cipher_methods[24];
18595 const EVP_MD *ssl_digest_methods[14];
18596 size_t ssl_mac_secret_size[14];
18597
18598 size_t tls12_sigalgs_len;
18599
18600 struct sigalg_lookup_st *sigalg_lookup_cache;
18601
18602 uint16_t *tls12_sigalgs;
18603
18604 TLS_GROUP_INFO *group_list;
18605 size_t group_list_len;
18606 size_t group_list_max_len;
18607
18608 TLS_SIGALG_INFO *sigalg_list;
18609 size_t sigalg_list_len;
18610 size_t sigalg_list_max_len;
18611
18612
18613 uint32_t disabled_enc_mask;
18614 uint32_t disabled_mac_mask;
18615 uint32_t disabled_mkey_mask;
18616 uint32_t disabled_auth_mask;
18617
18618
18619
18620
18621
18622
18623
18624 unsigned char *client_cert_type;
18625 size_t client_cert_type_len;
18626 unsigned char *server_cert_type;
18627 size_t server_cert_type_len;
18628
18629
18630 char *qlog_title;
18631
18632 };
18633
18634 typedef struct cert_pkey_st CERT_PKEY;
18635
18636
18637
18638
18639
18640 struct ssl_st {
18641 int type;
18642 SSL_CTX *ctx;
18643 const SSL_METHOD *defltmeth;
18644 const SSL_METHOD *method;
18645 CRYPTO_REF_COUNT references;
18646 CRYPTO_RWLOCK *lock;
18647
18648 CRYPTO_EX_DATA ex_data;
18649 };
18650
18651 struct ssl_connection_st {
18652
18653 struct ssl_st ssl;
18654
18655
18656
18657
18658 int version;
18659
18660
18661
18662
18663
18664 BIO *rbio;
18665
18666 BIO *wbio;
18667
18668 BIO *bbio;
18669
18670
18671
18672
18673
18674 int rwstate;
18675 int (*handshake_func) (SSL *);
18676 # 1248 "ssl/ssl_local.h"
18677 int server;
18678
18679
18680
18681
18682
18683
18684 int new_session;
18685
18686 int quiet_shutdown;
18687
18688 int shutdown;
18689
18690 OSSL_TIME ts_msg_write;
18691 OSSL_TIME ts_msg_read;
18692
18693 OSSL_STATEM statem;
18694 SSL_EARLY_DATA_STATE early_data_state;
18695 BUF_MEM *init_buf;
18696 void *init_msg;
18697
18698 size_t init_num;
18699 size_t init_off;
18700
18701 size_t ssl_pkey_num;
18702
18703 struct {
18704 long flags;
18705 unsigned char server_random[32];
18706 unsigned char client_random[32];
18707
18708
18709 BIO *handshake_buffer;
18710
18711
18712
18713
18714 EVP_MD_CTX *handshake_dgst;
18715
18716
18717
18718
18719
18720 int change_cipher_spec;
18721 int warn_alert;
18722 int fatal_alert;
18723
18724
18725
18726
18727 int alert_dispatch;
18728 unsigned char send_alert[2];
18729
18730
18731
18732
18733 int renegotiate;
18734 int total_renegotiations;
18735 int num_renegotiations;
18736 int in_read_app_data;
18737
18738 struct {
18739
18740 unsigned char finish_md[64 * 2];
18741 size_t finish_md_len;
18742 unsigned char peer_finish_md[64 * 2];
18743 size_t peer_finish_md_len;
18744 size_t message_size;
18745 int message_type;
18746
18747 const SSL_CIPHER *new_cipher;
18748 EVP_PKEY *pkey;
18749
18750 int cert_req;
18751
18752 uint8_t *ctype;
18753 size_t ctype_len;
18754
18755 struct stack_st_X509_NAME *peer_ca_names;
18756 size_t key_block_length;
18757 unsigned char *key_block;
18758 const EVP_CIPHER *new_sym_enc;
18759 const EVP_MD *new_hash;
18760 int new_mac_pkey_type;
18761 size_t new_mac_secret_size;
18762
18763 const SSL_COMP *new_compression;
18764
18765
18766
18767 int cert_request;
18768
18769 unsigned char *ciphers_raw;
18770 size_t ciphers_rawlen;
18771
18772 unsigned char *pms;
18773 size_t pmslen;
18774
18775
18776 unsigned char *psk;
18777 size_t psklen;
18778
18779
18780 const struct sigalg_lookup_st *sigalg;
18781
18782 CERT_PKEY *cert;
18783
18784
18785
18786
18787
18788
18789 uint16_t *peer_sigalgs;
18790 uint16_t *peer_cert_sigalgs;
18791
18792 size_t peer_sigalgslen;
18793 size_t peer_cert_sigalgslen;
18794
18795 const struct sigalg_lookup_st *peer_sigalg;
18796
18797
18798
18799
18800
18801 uint32_t *valid_flags;
18802
18803
18804
18805
18806
18807 uint32_t mask_k;
18808 uint32_t mask_a;
18809
18810
18811
18812
18813
18814 int min_ver;
18815 int max_ver;
18816 } tmp;
18817
18818
18819 unsigned char previous_client_finished[64];
18820 size_t previous_client_finished_len;
18821 unsigned char previous_server_finished[64];
18822 size_t previous_server_finished_len;
18823 int send_connection_binding;
18824
18825
18826
18827
18828
18829 int npn_seen;
18830 # 1413 "ssl/ssl_local.h"
18831 unsigned char *alpn_selected;
18832 size_t alpn_selected_len;
18833
18834 unsigned char *alpn_proposed;
18835 size_t alpn_proposed_len;
18836
18837 int alpn_sent;
18838
18839
18840
18841
18842
18843
18844 char is_probably_safari;
18845
18846
18847
18848
18849
18850
18851 char did_kex;
18852
18853
18854 uint16_t group_id;
18855 EVP_PKEY *peer_tmp;
18856
18857 } s3;
18858
18859 struct dtls1_state_st *d1;
18860
18861 void (*msg_callback) (int write_p, int version, int content_type,
18862 const void *buf, size_t len, SSL *ssl, void *arg);
18863 void *msg_callback_arg;
18864 int hit;
18865 X509_VERIFY_PARAM *param;
18866
18867 SSL_DANE dane;
18868
18869 struct stack_st_SSL_CIPHER *peer_ciphers;
18870 struct stack_st_SSL_CIPHER *cipher_list;
18871 struct stack_st_SSL_CIPHER *cipher_list_by_id;
18872
18873 struct stack_st_SSL_CIPHER *tls13_ciphersuites;
18874
18875
18876
18877
18878 uint32_t mac_flags;
18879
18880
18881
18882 unsigned char early_secret[64];
18883 unsigned char handshake_secret[64];
18884 unsigned char master_secret[64];
18885 unsigned char resumption_master_secret[64];
18886 unsigned char client_finished_secret[64];
18887 unsigned char server_finished_secret[64];
18888 unsigned char server_finished_hash[64];
18889 unsigned char handshake_traffic_hash[64];
18890 unsigned char client_app_traffic_secret[64];
18891 unsigned char server_app_traffic_secret[64];
18892 unsigned char exporter_master_secret[64];
18893 unsigned char early_exporter_master_secret[64];
18894
18895
18896
18897
18898 struct cert_st *cert;
18899
18900
18901
18902
18903
18904 unsigned char cert_verify_hash[64];
18905 size_t cert_verify_hash_len;
18906
18907
18908 enum {SSL_HRR_NONE = 0, SSL_HRR_PENDING, SSL_HRR_COMPLETE}
18909 hello_retry_request;
18910
18911
18912
18913
18914
18915 size_t sid_ctx_length;
18916 unsigned char sid_ctx[32];
18917
18918 SSL_SESSION *session;
18919
18920 SSL_SESSION *psksession;
18921 unsigned char *psksession_id;
18922 size_t psksession_id_len;
18923
18924 GEN_SESSION_CB generate_session_id;
18925
18926
18927
18928
18929 unsigned char tmp_session_id[32];
18930 size_t tmp_session_id_len;
18931
18932
18933
18934
18935
18936 uint32_t verify_mode;
18937
18938 int (*verify_callback) (int ok, X509_STORE_CTX *ctx);
18939
18940 void (*info_callback) (const SSL *ssl, int type, int val);
18941
18942 int error;
18943
18944 int error_code;
18945
18946 SSL_psk_client_cb_func psk_client_callback;
18947 SSL_psk_server_cb_func psk_server_callback;
18948
18949 SSL_psk_find_session_cb_func psk_find_session_cb;
18950 SSL_psk_use_session_cb_func psk_use_session_cb;
18951
18952
18953 struct stack_st_X509 *verified_chain;
18954 long verify_result;
18955
18956
18957
18958
18959
18960
18961 struct stack_st_X509_NAME *ca_names;
18962 struct stack_st_X509_NAME *client_ca_names;
18963
18964 uint64_t options;
18965
18966 uint32_t mode;
18967 int min_proto_version;
18968 int max_proto_version;
18969 size_t max_cert_list;
18970 int first_packet;
18971
18972
18973
18974
18975 int client_version;
18976
18977
18978
18979
18980 size_t split_send_fragment;
18981
18982
18983
18984
18985 size_t max_send_fragment;
18986
18987 size_t max_pipelines;
18988
18989 struct {
18990
18991 uint8_t extflags[TLSEXT_IDX_num_builtins];
18992
18993 void (*debug_cb)(SSL *s, int client_server, int type,
18994 const unsigned char *data, int len, void *arg);
18995 void *debug_arg;
18996 char *hostname;
18997
18998
18999 int status_type;
19000
19001 unsigned char *scts;
19002
19003 uint16_t scts_len;
19004
19005 int status_expected;
19006
19007 struct {
19008
19009 struct stack_st_OCSP_RESPID *ids;
19010 X509_EXTENSIONS *exts;
19011
19012 unsigned char *resp;
19013 size_t resp_len;
19014 } ocsp;
19015
19016
19017 int ticket_expected;
19018
19019 int extra_tickets_expected;
19020 size_t ecpointformats_len;
19021
19022 unsigned char *ecpointformats;
19023
19024 size_t peer_ecpointformats_len;
19025
19026 unsigned char *peer_ecpointformats;
19027 size_t supportedgroups_len;
19028
19029 uint16_t *supportedgroups;
19030
19031 size_t peer_supportedgroups_len;
19032
19033 uint16_t *peer_supportedgroups;
19034
19035
19036 TLS_SESSION_TICKET_EXT *session_ticket;
19037
19038 tls_session_ticket_ext_cb_fn session_ticket_cb;
19039 void *session_ticket_cb_arg;
19040
19041 tls_session_secret_cb_fn session_secret_cb;
19042 void *session_secret_cb_arg;
19043
19044
19045
19046
19047 unsigned char *alpn;
19048 size_t alpn_len;
19049
19050
19051
19052
19053
19054
19055
19056 unsigned char *npn;
19057 size_t npn_len;
19058
19059
19060 int psk_kex_mode;
19061
19062
19063 int use_etm;
19064
19065
19066 int early_data;
19067
19068 int early_data_ok;
19069
19070
19071 unsigned char *tls13_cookie;
19072 size_t tls13_cookie_len;
19073
19074 int cookieok;
19075 # 1667 "ssl/ssl_local.h"
19076 uint8_t max_fragment_len_mode;
19077
19078
19079
19080
19081
19082
19083 int tick_identity;
19084
19085
19086 int compress_certificate_from_peer[4];
19087
19088 int compress_certificate_sent;
19089
19090 uint8_t client_cert_type;
19091 uint8_t client_cert_type_ctos;
19092 uint8_t server_cert_type;
19093 uint8_t server_cert_type_ctos;
19094 } ext;
19095
19096
19097
19098
19099
19100 CLIENTHELLO_MSG *clienthello;
19101
19102
19103
19104
19105
19106
19107
19108 int servername_done;
19109
19110
19111
19112
19113
19114 ssl_ct_validation_cb ct_validation_callback;
19115
19116 void *ct_validation_callback_arg;
19117
19118
19119
19120
19121 struct stack_st_SCT *scts;
19122
19123 int scts_parsed;
19124
19125 SSL_CTX *session_ctx;
19126
19127
19128 struct stack_st_SRTP_PROTECTION_PROFILE *srtp_profiles;
19129
19130 SRTP_PROTECTION_PROFILE *srtp_profile;
19131
19132
19133
19134
19135
19136
19137 int renegotiate;
19138
19139 int key_update;
19140
19141 SSL_PHA_STATE post_handshake_auth;
19142 int pha_enabled;
19143 uint8_t* pha_context;
19144 size_t pha_context_len;
19145 int certreqs_sent;
19146 EVP_MD_CTX *pha_dgst;
19147
19148
19149
19150 SRP_CTX srp_ctx;
19151
19152
19153
19154
19155
19156 int (*not_resumable_session_cb) (SSL *ssl, int is_forward_secure);
19157
19158
19159 RECORD_LAYER rlayer;
19160
19161
19162 pem_password_cb *default_passwd_callback;
19163
19164 void *default_passwd_callback_userdata;
19165
19166 ASYNC_JOB *job;
19167 ASYNC_WAIT_CTX *waitctx;
19168 size_t asyncrw;
19169
19170
19171
19172
19173
19174 uint32_t max_early_data;
19175
19176
19177
19178
19179 uint32_t recv_max_early_data;
19180
19181
19182
19183
19184
19185
19186 uint32_t early_data_count;
19187
19188
19189 size_t num_tickets;
19190
19191 size_t sent_tickets;
19192
19193 uint64_t next_ticket_nonce;
19194
19195
19196 SSL_allow_early_data_cb_fn allow_early_data_cb;
19197 void *allow_early_data_cb_data;
19198
19199
19200 SSL_async_callback_fn async_cb;
19201 void *async_cb_arg;
19202
19203
19204
19205
19206
19207 const struct sigalg_lookup_st **shared_sigalgs;
19208 size_t shared_sigalgslen;
19209
19210
19211
19212
19213
19214
19215
19216 unsigned char *client_cert_type;
19217 size_t client_cert_type_len;
19218 unsigned char *server_cert_type;
19219 size_t server_cert_type_len;
19220 };
19221 # 1826 "ssl/ssl_local.h"
19222 # 1 "ssl/quic/quic_local.h" 1
19223 # 14 "ssl/quic/quic_local.h"
19224 # 1 "include/internal/quic_ssl.h" 1
19225 # 15 "include/internal/quic_ssl.h"
19226 # 1 "include/internal/quic_record_rx.h" 1
19227 # 14 "include/internal/quic_record_rx.h"
19228 # 1 "include/internal/quic_wire_pkt.h" 1
19229 # 14 "include/internal/quic_wire_pkt.h"
19230 # 1 "include/internal/packet_quic.h" 1
19231 # 12 "include/internal/packet_quic.h"
19232
19233
19234
19235 # 1 "include/internal/quic_vlint.h" 1
19236 # 12 "include/internal/quic_vlint.h"
19237
19238 # 39 "include/internal/quic_vlint.h"
19239 static __attribute__((unused)) inline size_t ossl_quic_vlint_encode_len(uint64_t v)
19240 {
19241 if (v < 64)
19242 return 1;
19243
19244 if (v < 16384)
19245 return 2;
19246
19247 if (v < 1073741824)
19248 return 4;
19249
19250 if (v <= (((uint64_t)1 << 62) - 1))
19251 return 8;
19252
19253 return 0;
19254 }
19255 # 68 "include/internal/quic_vlint.h"
19256 void ossl_quic_vlint_encode(unsigned char *buf, uint64_t v);
19257 # 90 "include/internal/quic_vlint.h"
19258 void ossl_quic_vlint_encode_n(unsigned char *buf, uint64_t v, int n);
19259
19260
19261
19262
19263
19264
19265 static __attribute__((unused)) inline size_t ossl_quic_vlint_decode_len(uint8_t first_byte)
19266 {
19267 return 1U << ((first_byte & 0xC0) >> 6);
19268 }
19269 # 111 "include/internal/quic_vlint.h"
19270 uint64_t ossl_quic_vlint_decode_unchecked(const unsigned char *buf);
19271 # 123 "include/internal/quic_vlint.h"
19272 int ossl_quic_vlint_decode(const unsigned char *buf, size_t buf_len, uint64_t *v);
19273 # 16 "include/internal/packet_quic.h" 2
19274
19275
19276
19277
19278
19279
19280 static inline int PACKET_get_quic_vlint(PACKET *pkt,
19281 uint64_t *data)
19282 {
19283 size_t enclen;
19284
19285 if (PACKET_remaining(pkt) < 1)
19286 return 0;
19287
19288 enclen = ossl_quic_vlint_decode_len(*pkt->curr);
19289
19290 if (PACKET_remaining(pkt) < enclen)
19291 return 0;
19292
19293 *data = ossl_quic_vlint_decode_unchecked(pkt->curr);
19294 packet_forward(pkt, enclen);
19295 return 1;
19296 }
19297
19298
19299
19300
19301
19302
19303
19304 static inline int PACKET_peek_quic_vlint_ex(PACKET *pkt,
19305 uint64_t *data,
19306 int *was_minimal)
19307 {
19308 size_t enclen;
19309
19310 if (PACKET_remaining(pkt) < 1)
19311 return 0;
19312
19313 enclen = ossl_quic_vlint_decode_len(*pkt->curr);
19314
19315 if (PACKET_remaining(pkt) < enclen)
19316 return 0;
19317
19318 *data = ossl_quic_vlint_decode_unchecked(pkt->curr);
19319
19320 if (was_minimal !=
19321 # 62 "include/internal/packet_quic.h" 3 4
19322 ((void *)0)
19323 # 62 "include/internal/packet_quic.h"
19324 )
19325 *was_minimal = (enclen == ossl_quic_vlint_encode_len(*data));
19326
19327 return 1;
19328 }
19329
19330 static inline int PACKET_peek_quic_vlint(PACKET *pkt,
19331 uint64_t *data)
19332 {
19333 return PACKET_peek_quic_vlint_ex(pkt, data,
19334 # 71 "include/internal/packet_quic.h" 3 4
19335 ((void *)0)
19336 # 71 "include/internal/packet_quic.h"
19337 );
19338 }
19339
19340
19341
19342
19343 static inline int PACKET_skip_quic_vlint(PACKET *pkt)
19344 {
19345 size_t enclen;
19346
19347 if (PACKET_remaining(pkt) < 1)
19348 return 0;
19349
19350 enclen = ossl_quic_vlint_decode_len(*pkt->curr);
19351
19352 if (PACKET_remaining(pkt) < enclen)
19353 return 0;
19354
19355 packet_forward(pkt, enclen);
19356 return 1;
19357 }
19358 # 100 "include/internal/packet_quic.h"
19359 static inline int PACKET_get_quic_length_prefixed(PACKET *pkt,
19360 PACKET *subpkt)
19361 {
19362 uint64_t length;
19363 const unsigned char *data;
19364 PACKET tmp = *pkt;
19365
19366 if (!PACKET_get_quic_vlint(&tmp, &length) ||
19367 length >
19368 # 108 "include/internal/packet_quic.h" 3 4
19369 (18446744073709551615UL)
19370 # 108 "include/internal/packet_quic.h"
19371 ||
19372 !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
19373 return 0;
19374 }
19375
19376 *pkt = tmp;
19377 subpkt->curr = data;
19378 subpkt->remaining = (size_t)length;
19379
19380 return 1;
19381 }
19382
19383
19384
19385
19386
19387 int WPACKET_start_quic_sub_packet(WPACKET *pkt);
19388 # 133 "include/internal/packet_quic.h"
19389 int WPACKET_start_quic_sub_packet_bound(WPACKET *pkt, size_t max_len);
19390
19391
19392
19393
19394
19395
19396
19397 int WPACKET_quic_sub_allocate_bytes(WPACKET *pkt, size_t len,
19398 unsigned char **bytes);
19399
19400
19401
19402
19403 int WPACKET_quic_write_vlint(WPACKET *pkt, uint64_t v);
19404 # 15 "include/internal/quic_wire_pkt.h" 2
19405 # 1 "include/internal/quic_types.h" 1
19406 # 15 "include/internal/quic_types.h"
19407 # 1 "/usr/include/assert.h" 1 3 4
19408 # 16 "include/internal/quic_types.h" 2
19409
19410
19411
19412
19413
19414 enum {
19415 QUIC_ENC_LEVEL_INITIAL = 0,
19416 QUIC_ENC_LEVEL_HANDSHAKE,
19417 QUIC_ENC_LEVEL_0RTT,
19418 QUIC_ENC_LEVEL_1RTT,
19419 QUIC_ENC_LEVEL_NUM
19420 };
19421
19422
19423 enum {
19424 QUIC_PN_SPACE_INITIAL = 0,
19425 QUIC_PN_SPACE_HANDSHAKE,
19426
19427 QUIC_PN_SPACE_APP,
19428 QUIC_PN_SPACE_NUM
19429 };
19430
19431 static __attribute__((unused)) inline uint32_t
19432 ossl_quic_enc_level_to_pn_space(uint32_t enc_level)
19433 {
19434 switch (enc_level) {
19435 case QUIC_ENC_LEVEL_INITIAL:
19436 return QUIC_PN_SPACE_INITIAL;
19437 case QUIC_ENC_LEVEL_HANDSHAKE:
19438 return QUIC_PN_SPACE_HANDSHAKE;
19439 case QUIC_ENC_LEVEL_0RTT:
19440 case QUIC_ENC_LEVEL_1RTT:
19441 return QUIC_PN_SPACE_APP;
19442 default:
19443
19444 # 50 "include/internal/quic_types.h" 3 4
19445 ((void) (0))
19446 # 50 "include/internal/quic_types.h"
19447 ;
19448 return QUIC_PN_SPACE_APP;
19449 }
19450 }
19451
19452
19453 typedef uint64_t QUIC_PN;
19454
19455
19456 static __attribute__((unused)) inline QUIC_PN ossl_quic_pn_max(QUIC_PN a, QUIC_PN b)
19457 {
19458 return a > b ? a : b;
19459 }
19460
19461 static __attribute__((unused)) inline QUIC_PN ossl_quic_pn_min(QUIC_PN a, QUIC_PN b)
19462 {
19463 return a < b ? a : b;
19464 }
19465
19466 static __attribute__((unused)) inline int ossl_quic_pn_valid(QUIC_PN pn)
19467 {
19468 return pn < (((QUIC_PN)1) << 62);
19469 }
19470
19471
19472
19473
19474
19475 typedef struct quic_conn_id_st {
19476 unsigned char id_len, id[20];
19477 } QUIC_CONN_ID;
19478
19479 static __attribute__((unused)) inline int ossl_quic_conn_id_eq(const QUIC_CONN_ID *a,
19480 const QUIC_CONN_ID *b)
19481 {
19482 if (a->id_len != b->id_len || a->id_len > 20)
19483 return 0;
19484 return memcmp(a->id, b->id, a->id_len) == 0;
19485 }
19486
19487
19488
19489
19490
19491 int ossl_quic_gen_rand_conn_id(OSSL_LIB_CTX *libctx, size_t len,
19492 QUIC_CONN_ID *cid);
19493 # 111 "include/internal/quic_types.h"
19494 typedef struct {
19495 unsigned char token[16];
19496 } QUIC_STATELESS_RESET_TOKEN;
19497 # 16 "include/internal/quic_wire_pkt.h" 2
19498 # 34 "include/internal/quic_wire_pkt.h"
19499 static inline __attribute__((unused)) uint32_t
19500 ossl_quic_pkt_type_to_enc_level(uint32_t pkt_type)
19501 {
19502 switch (pkt_type) {
19503 case 1:
19504 return QUIC_ENC_LEVEL_INITIAL;
19505 case 3:
19506 return QUIC_ENC_LEVEL_HANDSHAKE;
19507 case 2:
19508 return QUIC_ENC_LEVEL_0RTT;
19509 case 5:
19510 return QUIC_ENC_LEVEL_1RTT;
19511 default:
19512 return QUIC_ENC_LEVEL_NUM;
19513 }
19514 }
19515
19516 static inline __attribute__((unused)) uint32_t
19517 ossl_quic_enc_level_to_pkt_type(uint32_t enc_level)
19518 {
19519 switch (enc_level) {
19520 case QUIC_ENC_LEVEL_INITIAL:
19521 return 1;
19522 case QUIC_ENC_LEVEL_HANDSHAKE:
19523 return 3;
19524 case QUIC_ENC_LEVEL_0RTT:
19525 return 2;
19526 case QUIC_ENC_LEVEL_1RTT:
19527 return 5;
19528 default:
19529 return
19530 # 64 "include/internal/quic_wire_pkt.h" 3 4
19531 (4294967295U)
19532 # 64 "include/internal/quic_wire_pkt.h"
19533 ;
19534 }
19535 }
19536
19537
19538 static inline __attribute__((unused)) int
19539 ossl_quic_pkt_type_is_encrypted(uint32_t pkt_type)
19540 {
19541 switch (pkt_type) {
19542 case 4:
19543 case 6:
19544 return 0;
19545 default:
19546 return 1;
19547 }
19548 }
19549
19550
19551 static inline __attribute__((unused)) int
19552 ossl_quic_pkt_type_has_pn(uint32_t pkt_type)
19553 {
19554
19555
19556
19557
19558 return ossl_quic_pkt_type_is_encrypted(pkt_type);
19559 }
19560
19561
19562
19563
19564
19565 static inline __attribute__((unused)) int
19566 ossl_quic_pkt_type_can_share_dgram(uint32_t pkt_type)
19567 {
19568
19569
19570
19571
19572 return ossl_quic_pkt_type_is_encrypted(pkt_type);
19573 }
19574
19575
19576
19577
19578
19579 static inline __attribute__((unused)) int
19580 ossl_quic_pkt_type_must_be_last(uint32_t pkt_type)
19581 {
19582
19583
19584
19585
19586 return !ossl_quic_pkt_type_can_share_dgram(pkt_type)
19587 || pkt_type == 5;
19588 }
19589
19590
19591
19592
19593 static inline __attribute__((unused)) int
19594 ossl_quic_pkt_type_has_version(uint32_t pkt_type)
19595 {
19596 return pkt_type != 5 && pkt_type != 6;
19597 }
19598
19599
19600
19601
19602 static inline __attribute__((unused)) int
19603 ossl_quic_pkt_type_has_scid(uint32_t pkt_type)
19604 {
19605 return pkt_type != 5;
19606 }
19607 # 147 "include/internal/quic_wire_pkt.h"
19608 typedef struct quic_pkt_hdr_ptrs_st QUIC_PKT_HDR_PTRS;
19609 # 157 "include/internal/quic_wire_pkt.h"
19610 typedef struct quic_hdr_protector_st {
19611 OSSL_LIB_CTX *libctx;
19612 const char *propq;
19613 EVP_CIPHER_CTX *cipher_ctx;
19614 EVP_CIPHER *cipher;
19615 uint32_t cipher_id;
19616 } QUIC_HDR_PROTECTOR;
19617 # 188 "include/internal/quic_wire_pkt.h"
19618 int ossl_quic_hdr_protector_init(QUIC_HDR_PROTECTOR *hpr,
19619 OSSL_LIB_CTX *libctx,
19620 const char *propq,
19621 uint32_t cipher_id,
19622 const unsigned char *quic_hp_key,
19623 size_t quic_hp_key_len);
19624
19625
19626
19627
19628
19629
19630 void ossl_quic_hdr_protector_cleanup(QUIC_HDR_PROTECTOR *hpr);
19631 # 214 "include/internal/quic_wire_pkt.h"
19632 int ossl_quic_hdr_protector_decrypt(QUIC_HDR_PROTECTOR *hpr,
19633 QUIC_PKT_HDR_PTRS *ptrs);
19634 # 227 "include/internal/quic_wire_pkt.h"
19635 int ossl_quic_hdr_protector_encrypt(QUIC_HDR_PROTECTOR *hpr,
19636 QUIC_PKT_HDR_PTRS *ptrs);
19637 # 250 "include/internal/quic_wire_pkt.h"
19638 int ossl_quic_hdr_protector_decrypt_fields(QUIC_HDR_PROTECTOR *hpr,
19639 const unsigned char *sample,
19640 size_t sample_len,
19641 unsigned char *first_byte,
19642 unsigned char *pn_bytes);
19643
19644
19645
19646
19647
19648 int ossl_quic_hdr_protector_encrypt_fields(QUIC_HDR_PROTECTOR *hpr,
19649 const unsigned char *sample,
19650 size_t sample_len,
19651 unsigned char *first_byte,
19652 unsigned char *pn_bytes);
19653 # 311 "include/internal/quic_wire_pkt.h"
19654 typedef struct quic_pkt_hdr_st {
19655
19656 unsigned int type :8;
19657
19658
19659 unsigned int spin_bit :1;
19660
19661
19662
19663
19664
19665 unsigned int key_phase :1;
19666
19667
19668
19669
19670
19671 unsigned int pn_len :4;
19672
19673
19674
19675
19676
19677
19678 unsigned int partial :1;
19679
19680
19681
19682
19683
19684
19685
19686 unsigned int fixed :1;
19687
19688
19689
19690
19691
19692
19693
19694 unsigned int unused :4;
19695
19696
19697
19698
19699
19700
19701
19702 unsigned int reserved :2;
19703
19704
19705 uint32_t version;
19706
19707
19708 QUIC_CONN_ID dst_conn_id;
19709
19710
19711
19712
19713
19714 QUIC_CONN_ID src_conn_id;
19715 # 381 "include/internal/quic_wire_pkt.h"
19716 unsigned char pn[4];
19717 # 390 "include/internal/quic_wire_pkt.h"
19718 const unsigned char *token;
19719 size_t token_len;
19720 # 402 "include/internal/quic_wire_pkt.h"
19721 size_t len;
19722 # 427 "include/internal/quic_wire_pkt.h"
19723 const unsigned char *data;
19724 } QUIC_PKT_HDR;
19725
19726
19727
19728
19729
19730
19731 struct quic_pkt_hdr_ptrs_st {
19732 unsigned char *raw_start;
19733 unsigned char *raw_sample;
19734 size_t raw_sample_len;
19735
19736
19737
19738
19739
19740 unsigned char *raw_pn;
19741 };
19742 # 470 "include/internal/quic_wire_pkt.h"
19743 int ossl_quic_wire_decode_pkt_hdr(PACKET *pkt,
19744 size_t short_conn_id_len,
19745 int partial,
19746 int nodata,
19747 QUIC_PKT_HDR *hdr,
19748 QUIC_PKT_HDR_PTRS *ptrs);
19749 # 512 "include/internal/quic_wire_pkt.h"
19750 int ossl_quic_wire_encode_pkt_hdr(WPACKET *pkt,
19751 size_t short_conn_id_len,
19752 const QUIC_PKT_HDR *hdr,
19753 QUIC_PKT_HDR_PTRS *ptrs);
19754 # 527 "include/internal/quic_wire_pkt.h"
19755 int ossl_quic_wire_get_pkt_hdr_dst_conn_id(const unsigned char *buf,
19756 size_t buf_len,
19757 size_t short_conn_id_len,
19758 QUIC_CONN_ID *dst_conn_id);
19759 # 539 "include/internal/quic_wire_pkt.h"
19760 int ossl_quic_wire_get_encoded_pkt_hdr_len(size_t short_conn_id_len,
19761 const QUIC_PKT_HDR *hdr);
19762 # 558 "include/internal/quic_wire_pkt.h"
19763 int ossl_quic_wire_decode_pkt_hdr_pn(const unsigned char *enc_pn,
19764 size_t enc_pn_len,
19765 QUIC_PN largest_pn,
19766 QUIC_PN *res_pn);
19767
19768
19769
19770
19771
19772 int ossl_quic_wire_determine_pn_len(QUIC_PN pn, QUIC_PN largest_acked);
19773 # 577 "include/internal/quic_wire_pkt.h"
19774 int ossl_quic_wire_encode_pkt_hdr_pn(QUIC_PN pn,
19775 unsigned char *enc_pn,
19776 size_t enc_pn_len);
19777 # 600 "include/internal/quic_wire_pkt.h"
19778 int ossl_quic_validate_retry_integrity_tag(OSSL_LIB_CTX *libctx,
19779 const char *propq,
19780 const QUIC_PKT_HDR *hdr,
19781 const QUIC_CONN_ID *client_initial_dcid);
19782 # 621 "include/internal/quic_wire_pkt.h"
19783 int ossl_quic_calculate_retry_integrity_tag(OSSL_LIB_CTX *libctx,
19784 const char *propq,
19785 const QUIC_PKT_HDR *hdr,
19786 const QUIC_CONN_ID *client_initial_dcid,
19787 unsigned char *tag);
19788 # 15 "include/internal/quic_record_rx.h" 2
19789
19790 # 1 "include/internal/quic_predef.h" 1
19791 # 15 "include/internal/quic_predef.h"
19792 typedef struct quic_port_st QUIC_PORT;
19793 typedef struct quic_channel_st QUIC_CHANNEL;
19794 typedef struct quic_tls_st QUIC_TLS;
19795 typedef struct quic_txpim_st QUIC_TXPIM;
19796 typedef struct quic_fifd_st QUIC_FIFD;
19797 typedef struct quic_cfq_st QUIC_CFQ;
19798 typedef struct ossl_quic_tx_packetiser_st OSSL_QUIC_TX_PACKETISER;
19799 typedef struct ossl_ackm_st OSSL_ACKM;
19800 typedef struct quic_srt_elem_st QUIC_SRT_ELEM;
19801 typedef struct ossl_cc_data_st OSSL_CC_DATA;
19802 typedef struct ossl_cc_method_st OSSL_CC_METHOD;
19803 typedef struct quic_stream_map_st QUIC_STREAM_MAP;
19804 typedef struct quic_stream_st QUIC_STREAM;
19805 typedef struct quic_sstream_st QUIC_SSTREAM;
19806 typedef struct quic_rstream_st QUIC_RSTREAM;
19807 typedef struct quic_reactor_st QUIC_REACTOR;
19808 typedef struct ossl_statm_st OSSL_STATM;
19809 typedef struct quic_demux_st QUIC_DEMUX;
19810 typedef struct ossl_qrx_pkt_st OSSL_QRX_PKT;
19811 typedef struct ossl_qtx_pkt_st OSSL_QTX_PKT;
19812 typedef struct quic_tick_result_st QUIC_TICK_RESULT;
19813 typedef struct quic_srtm_st QUIC_SRTM;
19814 typedef struct quic_lcidm_st QUIC_LCIDM;
19815 typedef struct quic_urxe_st QUIC_URXE;
19816 typedef struct quic_engine_st QUIC_ENGINE;
19817 # 17 "include/internal/quic_record_rx.h" 2
19818 # 1 "include/internal/quic_record_util.h" 1
19819 # 18 "include/internal/quic_record_util.h"
19820 struct ossl_qrx_st;
19821 struct ossl_qtx_st;
19822
19823
19824
19825
19826
19827
19828
19829 int ossl_quic_hkdf_extract(OSSL_LIB_CTX *libctx,
19830 const char *propq,
19831 const EVP_MD *md,
19832 const unsigned char *salt, size_t salt_len,
19833 const unsigned char *ikm, size_t ikm_len,
19834 unsigned char *out, size_t out_len);
19835 # 61 "include/internal/quic_record_util.h"
19836 int ossl_quic_provide_initial_secret(OSSL_LIB_CTX *libctx,
19837 const char *propq,
19838 const QUIC_CONN_ID *dst_conn_id,
19839 int is_server,
19840 struct ossl_qrx_st *qrx,
19841 struct ossl_qtx_st *qtx);
19842 # 79 "include/internal/quic_record_util.h"
19843 const char *ossl_qrl_get_suite_cipher_name(uint32_t suite_id);
19844
19845
19846 const char *ossl_qrl_get_suite_md_name(uint32_t suite_id);
19847
19848
19849 uint32_t ossl_qrl_get_suite_secret_len(uint32_t suite_id);
19850
19851
19852 uint32_t ossl_qrl_get_suite_cipher_key_len(uint32_t suite_id);
19853
19854
19855 uint32_t ossl_qrl_get_suite_cipher_iv_len(uint32_t suite_id);
19856
19857
19858 uint32_t ossl_qrl_get_suite_cipher_tag_len(uint32_t suite_id);
19859
19860
19861 uint32_t ossl_qrl_get_suite_hdr_prot_cipher_id(uint32_t suite_id);
19862
19863
19864 uint32_t ossl_qrl_get_suite_hdr_prot_key_len(uint32_t suite_id);
19865
19866
19867
19868
19869
19870 uint64_t ossl_qrl_get_suite_max_pkt(uint32_t suite_id);
19871
19872
19873
19874
19875
19876 uint64_t ossl_qrl_get_suite_max_forged_pkt(uint32_t suite_id);
19877 # 18 "include/internal/quic_record_rx.h" 2
19878 # 1 "include/internal/quic_demux.h" 1
19879 # 16 "include/internal/quic_demux.h"
19880 # 1 "include/internal/bio_addr.h" 1
19881 # 14 "include/internal/bio_addr.h"
19882 # 1 "include/internal/sockets.h" 1
19883 # 12 "include/internal/sockets.h"
19884
19885 # 85 "include/internal/sockets.h"
19886 # 1 "/usr/include/x86_64-linux-gnu/sys/param.h" 1 3 4
19887 # 23 "/usr/include/x86_64-linux-gnu/sys/param.h" 3 4
19888 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
19889 # 24 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4
19890
19891
19892 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 1 3 4
19893 # 27 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4
19894
19895 # 1 "/usr/include/signal.h" 1 3 4
19896 # 27 "/usr/include/signal.h" 3 4
19897
19898
19899
19900 # 1 "/usr/include/x86_64-linux-gnu/bits/signum-generic.h" 1 3 4
19901 # 76 "/usr/include/x86_64-linux-gnu/bits/signum-generic.h" 3 4
19902 # 1 "/usr/include/x86_64-linux-gnu/bits/signum-arch.h" 1 3 4
19903 # 77 "/usr/include/x86_64-linux-gnu/bits/signum-generic.h" 2 3 4
19904 # 31 "/usr/include/signal.h" 2 3 4
19905
19906 # 1 "/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h" 1 3 4
19907
19908
19909
19910
19911
19912
19913
19914
19915 # 8 "/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h" 3 4
19916 typedef __sig_atomic_t sig_atomic_t;
19917 # 33 "/usr/include/signal.h" 2 3 4
19918 # 57 "/usr/include/signal.h" 3 4
19919 # 1 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 1 3 4
19920
19921
19922
19923 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
19924 # 5 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 2 3 4
19925
19926 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h" 1 3 4
19927 # 24 "/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h" 3 4
19928 union sigval
19929 {
19930 int sival_int;
19931 void *sival_ptr;
19932 };
19933
19934 typedef union sigval __sigval_t;
19935 # 7 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 2 3 4
19936 # 16 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 3 4
19937 # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h" 1 3 4
19938 # 17 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 2 3 4
19939 # 36 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 3 4
19940 typedef struct
19941 {
19942 int si_signo;
19943
19944 int si_errno;
19945
19946 int si_code;
19947
19948
19949
19950
19951
19952 int __pad0;
19953
19954
19955 union
19956 {
19957 int _pad[((128 / sizeof (int)) - 4)];
19958
19959
19960 struct
19961 {
19962 __pid_t si_pid;
19963 __uid_t si_uid;
19964 } _kill;
19965
19966
19967 struct
19968 {
19969 int si_tid;
19970 int si_overrun;
19971 __sigval_t si_sigval;
19972 } _timer;
19973
19974
19975 struct
19976 {
19977 __pid_t si_pid;
19978 __uid_t si_uid;
19979 __sigval_t si_sigval;
19980 } _rt;
19981
19982
19983 struct
19984 {
19985 __pid_t si_pid;
19986 __uid_t si_uid;
19987 int si_status;
19988 __clock_t si_utime;
19989 __clock_t si_stime;
19990 } _sigchld;
19991
19992
19993 struct
19994 {
19995 void *si_addr;
19996
19997 short int si_addr_lsb;
19998 union
19999 {
20000
20001 struct
20002 {
20003 void *_lower;
20004 void *_upper;
20005 } _addr_bnd;
20006
20007 __uint32_t _pkey;
20008 } _bounds;
20009 } _sigfault;
20010
20011
20012 struct
20013 {
20014 long int si_band;
20015 int si_fd;
20016 } _sigpoll;
20017
20018
20019
20020 struct
20021 {
20022 void *_call_addr;
20023 int _syscall;
20024 unsigned int _arch;
20025 } _sigsys;
20026
20027 } _sifields;
20028 } siginfo_t ;
20029 # 58 "/usr/include/signal.h" 2 3 4
20030 # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 1 3 4
20031 # 35 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 3 4
20032 enum
20033 {
20034 SI_ASYNCNL = -60,
20035 SI_DETHREAD = -7,
20036
20037 SI_TKILL,
20038 SI_SIGIO,
20039
20040 SI_ASYNCIO,
20041 SI_MESGQ,
20042 SI_TIMER,
20043
20044
20045
20046
20047
20048 SI_QUEUE,
20049 SI_USER,
20050 SI_KERNEL = 0x80
20051 # 66 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 3 4
20052 };
20053
20054
20055
20056
20057 enum
20058 {
20059 ILL_ILLOPC = 1,
20060
20061 ILL_ILLOPN,
20062
20063 ILL_ILLADR,
20064
20065 ILL_ILLTRP,
20066
20067 ILL_PRVOPC,
20068
20069 ILL_PRVREG,
20070
20071 ILL_COPROC,
20072
20073 ILL_BADSTK,
20074
20075 ILL_BADIADDR
20076
20077 };
20078
20079
20080 enum
20081 {
20082 FPE_INTDIV = 1,
20083
20084 FPE_INTOVF,
20085
20086 FPE_FLTDIV,
20087
20088 FPE_FLTOVF,
20089
20090 FPE_FLTUND,
20091
20092 FPE_FLTRES,
20093
20094 FPE_FLTINV,
20095
20096 FPE_FLTSUB,
20097
20098 FPE_FLTUNK = 14,
20099
20100 FPE_CONDTRAP
20101
20102 };
20103
20104
20105 enum
20106 {
20107 SEGV_MAPERR = 1,
20108
20109 SEGV_ACCERR,
20110
20111 SEGV_BNDERR,
20112
20113 SEGV_PKUERR,
20114
20115 SEGV_ACCADI,
20116
20117 SEGV_ADIDERR,
20118
20119 SEGV_ADIPERR,
20120
20121 SEGV_MTEAERR,
20122
20123 SEGV_MTESERR,
20124
20125 SEGV_CPERR
20126
20127 };
20128
20129
20130 enum
20131 {
20132 BUS_ADRALN = 1,
20133
20134 BUS_ADRERR,
20135
20136 BUS_OBJERR,
20137
20138 BUS_MCEERR_AR,
20139
20140 BUS_MCEERR_AO
20141
20142 };
20143 # 178 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 3 4
20144 enum
20145 {
20146 CLD_EXITED = 1,
20147
20148 CLD_KILLED,
20149
20150 CLD_DUMPED,
20151
20152 CLD_TRAPPED,
20153
20154 CLD_STOPPED,
20155
20156 CLD_CONTINUED
20157
20158 };
20159
20160
20161 enum
20162 {
20163 POLL_IN = 1,
20164
20165 POLL_OUT,
20166
20167 POLL_MSG,
20168
20169 POLL_ERR,
20170
20171 POLL_PRI,
20172
20173 POLL_HUP
20174
20175 };
20176 # 59 "/usr/include/signal.h" 2 3 4
20177
20178
20179
20180 # 1 "/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h" 1 3 4
20181 # 16 "/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h" 3 4
20182 typedef __sigval_t sigval_t;
20183 # 63 "/usr/include/signal.h" 2 3 4
20184
20185
20186
20187 # 1 "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h" 1 3 4
20188
20189
20190
20191 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
20192 # 5 "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h" 2 3 4
20193 # 22 "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h" 3 4
20194 typedef struct sigevent
20195 {
20196 __sigval_t sigev_value;
20197 int sigev_signo;
20198 int sigev_notify;
20199
20200 union
20201 {
20202 int _pad[((64 / sizeof (int)) - 4)];
20203
20204
20205
20206 __pid_t _tid;
20207
20208 struct
20209 {
20210 void (*_function) (__sigval_t);
20211 pthread_attr_t *_attribute;
20212 } _sigev_thread;
20213 } _sigev_un;
20214 } sigevent_t;
20215 # 67 "/usr/include/signal.h" 2 3 4
20216 # 1 "/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h" 1 3 4
20217 # 27 "/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h" 3 4
20218 enum
20219 {
20220 SIGEV_SIGNAL = 0,
20221
20222 SIGEV_NONE,
20223
20224 SIGEV_THREAD,
20225
20226
20227 SIGEV_THREAD_ID = 4
20228
20229
20230 };
20231 # 68 "/usr/include/signal.h" 2 3 4
20232
20233
20234
20235
20236 typedef void (*__sighandler_t) (int);
20237
20238
20239
20240
20241 extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
20242 __attribute__ ((__nothrow__ , __leaf__));
20243 # 88 "/usr/include/signal.h" 3 4
20244 extern __sighandler_t signal (int __sig, __sighandler_t __handler)
20245 __attribute__ ((__nothrow__ , __leaf__));
20246 # 112 "/usr/include/signal.h" 3 4
20247 extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ , __leaf__));
20248
20249
20250
20251
20252
20253
20254 extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ , __leaf__));
20255
20256
20257
20258 extern int raise (int __sig) __attribute__ ((__nothrow__ , __leaf__));
20259
20260
20261
20262 extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
20263 __attribute__ ((__nothrow__ , __leaf__));
20264 extern int gsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
20265
20266
20267
20268
20269 extern void psignal (int __sig, const char *__s);
20270
20271
20272 extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
20273 # 173 "/usr/include/signal.h" 3 4
20274 extern int sigblock (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
20275
20276
20277 extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
20278
20279
20280 extern int siggetmask (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
20281 # 193 "/usr/include/signal.h" 3 4
20282 typedef __sighandler_t sig_t;
20283
20284
20285
20286
20287
20288 extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
20289
20290
20291 extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
20292
20293
20294 extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
20295
20296
20297 extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
20298
20299
20300 extern int sigismember (const sigset_t *__set, int __signo)
20301 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
20302 # 229 "/usr/include/signal.h" 3 4
20303 # 1 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 1 3 4
20304 # 27 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 3 4
20305 struct sigaction
20306 {
20307
20308
20309 union
20310 {
20311
20312 __sighandler_t sa_handler;
20313
20314 void (*sa_sigaction) (int, siginfo_t *, void *);
20315 }
20316 __sigaction_handler;
20317
20318
20319
20320
20321
20322
20323
20324 __sigset_t sa_mask;
20325
20326
20327 int sa_flags;
20328
20329
20330 void (*sa_restorer) (void);
20331 };
20332 # 230 "/usr/include/signal.h" 2 3 4
20333
20334
20335 extern int sigprocmask (int __how, const sigset_t *__restrict __set,
20336 sigset_t *__restrict __oset) __attribute__ ((__nothrow__ , __leaf__));
20337
20338
20339
20340
20341
20342
20343 extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
20344
20345
20346 extern int sigaction (int __sig, const struct sigaction *__restrict __act,
20347 struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ , __leaf__));
20348
20349
20350 extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
20351
20352
20353
20354
20355
20356
20357
20358 extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
20359 __attribute__ ((__nonnull__ (1, 2)));
20360
20361
20362
20363
20364
20365
20366
20367 extern int sigwaitinfo (const sigset_t *__restrict __set,
20368 siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
20369
20370
20371
20372
20373
20374
20375
20376 extern int sigtimedwait (const sigset_t *__restrict __set,
20377 siginfo_t *__restrict __info,
20378 const struct timespec *__restrict __timeout)
20379 __attribute__ ((__nonnull__ (1)));
20380 # 292 "/usr/include/signal.h" 3 4
20381 extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
20382 __attribute__ ((__nothrow__ , __leaf__));
20383
20384
20385
20386
20387
20388
20389
20390 # 1 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 1 3 4
20391 # 31 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4
20392 struct _fpx_sw_bytes
20393 {
20394 __uint32_t magic1;
20395 __uint32_t extended_size;
20396 __uint64_t xstate_bv;
20397 __uint32_t xstate_size;
20398 __uint32_t __glibc_reserved1[7];
20399 };
20400
20401 struct _fpreg
20402 {
20403 unsigned short significand[4];
20404 unsigned short exponent;
20405 };
20406
20407 struct _fpxreg
20408 {
20409 unsigned short significand[4];
20410 unsigned short exponent;
20411 unsigned short __glibc_reserved1[3];
20412 };
20413
20414 struct _xmmreg
20415 {
20416 __uint32_t element[4];
20417 };
20418 # 123 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4
20419 struct _fpstate
20420 {
20421
20422 __uint16_t cwd;
20423 __uint16_t swd;
20424 __uint16_t ftw;
20425 __uint16_t fop;
20426 __uint64_t rip;
20427 __uint64_t rdp;
20428 __uint32_t mxcsr;
20429 __uint32_t mxcr_mask;
20430 struct _fpxreg _st[8];
20431 struct _xmmreg _xmm[16];
20432 __uint32_t __glibc_reserved1[24];
20433 };
20434
20435 struct sigcontext
20436 {
20437 __uint64_t r8;
20438 __uint64_t r9;
20439 __uint64_t r10;
20440 __uint64_t r11;
20441 __uint64_t r12;
20442 __uint64_t r13;
20443 __uint64_t r14;
20444 __uint64_t r15;
20445 __uint64_t rdi;
20446 __uint64_t rsi;
20447 __uint64_t rbp;
20448 __uint64_t rbx;
20449 __uint64_t rdx;
20450 __uint64_t rax;
20451 __uint64_t rcx;
20452 __uint64_t rsp;
20453 __uint64_t rip;
20454 __uint64_t eflags;
20455 unsigned short cs;
20456 unsigned short gs;
20457 unsigned short fs;
20458 unsigned short __pad0;
20459 __uint64_t err;
20460 __uint64_t trapno;
20461 __uint64_t oldmask;
20462 __uint64_t cr2;
20463 __extension__ union
20464 {
20465 struct _fpstate * fpstate;
20466 __uint64_t __fpstate_word;
20467 };
20468 __uint64_t __reserved1 [8];
20469 };
20470
20471
20472
20473 struct _xsave_hdr
20474 {
20475 __uint64_t xstate_bv;
20476 __uint64_t __glibc_reserved1[2];
20477 __uint64_t __glibc_reserved2[5];
20478 };
20479
20480 struct _ymmh_state
20481 {
20482 __uint32_t ymmh_space[64];
20483 };
20484
20485 struct _xstate
20486 {
20487 struct _fpstate fpstate;
20488 struct _xsave_hdr xstate_hdr;
20489 struct _ymmh_state ymmh;
20490 };
20491 # 302 "/usr/include/signal.h" 2 3 4
20492
20493
20494 extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ , __leaf__));
20495
20496
20497
20498
20499
20500
20501 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
20502 # 312 "/usr/include/signal.h" 2 3 4
20503
20504 # 1 "/usr/include/x86_64-linux-gnu/bits/types/stack_t.h" 1 3 4
20505 # 23 "/usr/include/x86_64-linux-gnu/bits/types/stack_t.h" 3 4
20506 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
20507 # 24 "/usr/include/x86_64-linux-gnu/bits/types/stack_t.h" 2 3 4
20508
20509
20510 typedef struct
20511 {
20512 void *ss_sp;
20513 int ss_flags;
20514 size_t ss_size;
20515 } stack_t;
20516 # 314 "/usr/include/signal.h" 2 3 4
20517
20518
20519 # 1 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 1 3 4
20520 # 37 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4
20521 __extension__ typedef long long int greg_t;
20522 # 46 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4
20523 typedef greg_t gregset_t[23];
20524 # 101 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4
20525 struct _libc_fpxreg
20526 {
20527 unsigned short int significand[4];
20528 unsigned short int exponent;
20529 unsigned short int __glibc_reserved1[3];
20530 };
20531
20532 struct _libc_xmmreg
20533 {
20534 __uint32_t element[4];
20535 };
20536
20537 struct _libc_fpstate
20538 {
20539
20540 __uint16_t cwd;
20541 __uint16_t swd;
20542 __uint16_t ftw;
20543 __uint16_t fop;
20544 __uint64_t rip;
20545 __uint64_t rdp;
20546 __uint32_t mxcsr;
20547 __uint32_t mxcr_mask;
20548 struct _libc_fpxreg _st[8];
20549 struct _libc_xmmreg _xmm[16];
20550 __uint32_t __glibc_reserved1[24];
20551 };
20552
20553
20554 typedef struct _libc_fpstate *fpregset_t;
20555
20556
20557 typedef struct
20558 {
20559 gregset_t gregs;
20560
20561 fpregset_t fpregs;
20562 __extension__ unsigned long long __reserved1 [8];
20563 } mcontext_t;
20564
20565
20566 typedef struct ucontext_t
20567 {
20568 unsigned long int uc_flags;
20569 struct ucontext_t *uc_link;
20570 stack_t uc_stack;
20571 mcontext_t uc_mcontext;
20572 sigset_t uc_sigmask;
20573 struct _libc_fpstate __fpregs_mem;
20574 __extension__ unsigned long long int __ssp[4];
20575 } ucontext_t;
20576 # 317 "/usr/include/signal.h" 2 3 4
20577
20578
20579
20580
20581
20582
20583
20584 extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__))
20585 __attribute__ ((__deprecated__ ("Use sigaction with SA_RESTART instead")));
20586
20587 # 1 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 1 3 4
20588 # 328 "/usr/include/signal.h" 2 3 4
20589 # 1 "/usr/include/x86_64-linux-gnu/bits/sigstksz.h" 1 3 4
20590 # 329 "/usr/include/signal.h" 2 3 4
20591 # 1 "/usr/include/x86_64-linux-gnu/bits/ss_flags.h" 1 3 4
20592 # 27 "/usr/include/x86_64-linux-gnu/bits/ss_flags.h" 3 4
20593 enum
20594 {
20595 SS_ONSTACK = 1,
20596
20597 SS_DISABLE
20598
20599 };
20600 # 330 "/usr/include/signal.h" 2 3 4
20601
20602
20603
20604 extern int sigaltstack (const stack_t *__restrict __ss,
20605 stack_t *__restrict __oss) __attribute__ ((__nothrow__ , __leaf__));
20606
20607
20608
20609
20610 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h" 1 3 4
20611 # 23 "/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h" 3 4
20612 struct sigstack
20613 {
20614 void *ss_sp;
20615 int ss_onstack;
20616 };
20617 # 340 "/usr/include/signal.h" 2 3 4
20618
20619
20620
20621
20622
20623
20624
20625 extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
20626 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
20627 # 376 "/usr/include/signal.h" 3 4
20628 # 1 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 1 3 4
20629 # 31 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 3 4
20630 extern int pthread_sigmask (int __how,
20631 const __sigset_t *__restrict __newmask,
20632 __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ , __leaf__));
20633
20634
20635 extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ , __leaf__));
20636 # 377 "/usr/include/signal.h" 2 3 4
20637
20638
20639
20640
20641
20642
20643 extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ , __leaf__));
20644
20645 extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ , __leaf__));
20646
20647
20648
20649
20650
20651 # 1 "/usr/include/x86_64-linux-gnu/bits/signal_ext.h" 1 3 4
20652 # 392 "/usr/include/signal.h" 2 3 4
20653
20654
20655 # 29 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4
20656
20657
20658 # 1 "/usr/include/x86_64-linux-gnu/bits/param.h" 1 3 4
20659 # 28 "/usr/include/x86_64-linux-gnu/bits/param.h" 3 4
20660 # 1 "/usr/include/linux/param.h" 1 3 4
20661
20662
20663
20664
20665 # 1 "/usr/include/x86_64-linux-gnu/asm/param.h" 1 3 4
20666 # 1 "/usr/include/asm-generic/param.h" 1 3 4
20667 # 2 "/usr/include/x86_64-linux-gnu/asm/param.h" 2 3 4
20668 # 6 "/usr/include/linux/param.h" 2 3 4
20669 # 29 "/usr/include/x86_64-linux-gnu/bits/param.h" 2 3 4
20670 # 32 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4
20671 # 86 "include/internal/sockets.h" 2
20672
20673
20674
20675
20676
20677 # 1 "/usr/include/netdb.h" 1 3 4
20678 # 27 "/usr/include/netdb.h" 3 4
20679 # 1 "/usr/include/netinet/in.h" 1 3 4
20680 # 23 "/usr/include/netinet/in.h" 3 4
20681 # 1 "/usr/include/x86_64-linux-gnu/sys/socket.h" 1 3 4
20682 # 24 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
20683
20684
20685 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h" 1 3 4
20686 # 23 "/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h" 3 4
20687 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
20688 # 24 "/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h" 2 3 4
20689
20690
20691 struct iovec
20692 {
20693 void *iov_base;
20694 size_t iov_len;
20695 };
20696 # 27 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4
20697
20698 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
20699 # 29 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4
20700
20701
20702
20703
20704 # 1 "/usr/include/x86_64-linux-gnu/bits/socket.h" 1 3 4
20705 # 27 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
20706 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
20707 # 28 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4
20708 # 38 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
20709 # 1 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 1 3 4
20710 # 24 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 3 4
20711 enum __socket_type
20712 {
20713 SOCK_STREAM = 1,
20714
20715
20716 SOCK_DGRAM = 2,
20717
20718
20719 SOCK_RAW = 3,
20720
20721 SOCK_RDM = 4,
20722
20723 SOCK_SEQPACKET = 5,
20724
20725
20726 SOCK_DCCP = 6,
20727
20728 SOCK_PACKET = 10,
20729
20730
20731
20732
20733
20734
20735
20736 SOCK_CLOEXEC = 02000000,
20737
20738
20739 SOCK_NONBLOCK = 00004000
20740
20741
20742 };
20743 # 39 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4
20744 # 180 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
20745 # 1 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 1 3 4
20746 # 28 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 3 4
20747 typedef unsigned short int sa_family_t;
20748 # 181 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4
20749
20750
20751 struct sockaddr
20752 {
20753 sa_family_t sa_family;
20754 char sa_data[14];
20755 };
20756 # 196 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
20757 struct sockaddr_storage
20758 {
20759 sa_family_t ss_family;
20760 char __ss_padding[(128 - (sizeof (unsigned short int)) - sizeof (unsigned long int))];
20761 unsigned long int __ss_align;
20762 };
20763
20764
20765
20766 enum
20767 {
20768 MSG_OOB = 0x01,
20769
20770 MSG_PEEK = 0x02,
20771
20772 MSG_DONTROUTE = 0x04,
20773
20774
20775
20776
20777
20778
20779 MSG_CTRUNC = 0x08,
20780
20781 MSG_PROXY = 0x10,
20782
20783 MSG_TRUNC = 0x20,
20784
20785 MSG_DONTWAIT = 0x40,
20786
20787 MSG_EOR = 0x80,
20788
20789 MSG_WAITALL = 0x100,
20790
20791 MSG_FIN = 0x200,
20792
20793 MSG_SYN = 0x400,
20794
20795 MSG_CONFIRM = 0x800,
20796
20797 MSG_RST = 0x1000,
20798
20799 MSG_ERRQUEUE = 0x2000,
20800
20801 MSG_NOSIGNAL = 0x4000,
20802
20803 MSG_MORE = 0x8000,
20804
20805 MSG_WAITFORONE = 0x10000,
20806
20807 MSG_BATCH = 0x40000,
20808
20809 MSG_ZEROCOPY = 0x4000000,
20810
20811 MSG_FASTOPEN = 0x20000000,
20812
20813
20814 MSG_CMSG_CLOEXEC = 0x40000000
20815
20816
20817
20818 };
20819
20820
20821
20822
20823 struct msghdr
20824 {
20825 void *msg_name;
20826 socklen_t msg_namelen;
20827
20828 struct iovec *msg_iov;
20829 size_t msg_iovlen;
20830
20831 void *msg_control;
20832 size_t msg_controllen;
20833
20834
20835
20836
20837 int msg_flags;
20838 };
20839
20840
20841 struct cmsghdr
20842 {
20843 size_t cmsg_len;
20844
20845
20846
20847
20848 int cmsg_level;
20849 int cmsg_type;
20850
20851 __extension__ unsigned char __cmsg_data [];
20852
20853 };
20854 # 316 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
20855 extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
20856 struct cmsghdr *__cmsg) __attribute__ ((__nothrow__ , __leaf__));
20857
20858
20859
20860
20861 extern __inline __attribute__ ((__gnu_inline__)) struct cmsghdr *
20862 __attribute__ ((__nothrow__ , __leaf__)) __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
20863 {
20864
20865
20866
20867
20868
20869
20870
20871 unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control;
20872 unsigned char * __cmsg_ptr = (unsigned char *) __cmsg;
20873
20874 size_t __size_needed = sizeof (struct cmsghdr)
20875 + ((sizeof (size_t) - ((__cmsg->cmsg_len) & (sizeof (size_t) - 1))) & (sizeof (size_t) - 1));
20876
20877
20878 if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
20879 return (struct cmsghdr *) 0;
20880
20881
20882
20883 if (((size_t)
20884 (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr)
20885 < __size_needed)
20886 || ((size_t)
20887 (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr
20888 - __size_needed)
20889 < __cmsg->cmsg_len))
20890
20891 return (struct cmsghdr *) 0;
20892
20893
20894 __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
20895 + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)));
20896 return __cmsg;
20897 }
20898
20899
20900
20901
20902 enum
20903 {
20904 SCM_RIGHTS = 0x01
20905 # 375 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
20906 };
20907 # 389 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
20908 # 1 "/usr/include/x86_64-linux-gnu/asm/socket.h" 1 3 4
20909 # 1 "/usr/include/asm-generic/socket.h" 1 3 4
20910
20911
20912
20913
20914 # 1 "/usr/include/linux/posix_types.h" 1 3 4
20915
20916
20917
20918
20919 # 1 "/usr/include/linux/stddef.h" 1 3 4
20920 # 6 "/usr/include/linux/posix_types.h" 2 3 4
20921 # 25 "/usr/include/linux/posix_types.h" 3 4
20922 typedef struct {
20923 unsigned long fds_bits[1024 / (8 * sizeof(long))];
20924 } __kernel_fd_set;
20925
20926
20927 typedef void (*__kernel_sighandler_t)(int);
20928
20929
20930 typedef int __kernel_key_t;
20931 typedef int __kernel_mqd_t;
20932
20933 # 1 "/usr/include/x86_64-linux-gnu/asm/posix_types.h" 1 3 4
20934
20935
20936
20937
20938
20939
20940 # 1 "/usr/include/x86_64-linux-gnu/asm/posix_types_64.h" 1 3 4
20941 # 11 "/usr/include/x86_64-linux-gnu/asm/posix_types_64.h" 3 4
20942 typedef unsigned short __kernel_old_uid_t;
20943 typedef unsigned short __kernel_old_gid_t;
20944
20945
20946 typedef unsigned long __kernel_old_dev_t;
20947
20948
20949 # 1 "/usr/include/asm-generic/posix_types.h" 1 3 4
20950
20951
20952
20953
20954 # 1 "/usr/include/x86_64-linux-gnu/asm/bitsperlong.h" 1 3 4
20955 # 11 "/usr/include/x86_64-linux-gnu/asm/bitsperlong.h" 3 4
20956 # 1 "/usr/include/asm-generic/bitsperlong.h" 1 3 4
20957 # 12 "/usr/include/x86_64-linux-gnu/asm/bitsperlong.h" 2 3 4
20958 # 6 "/usr/include/asm-generic/posix_types.h" 2 3 4
20959 # 15 "/usr/include/asm-generic/posix_types.h" 3 4
20960 typedef long __kernel_long_t;
20961 typedef unsigned long __kernel_ulong_t;
20962
20963
20964
20965 typedef __kernel_ulong_t __kernel_ino_t;
20966
20967
20968
20969 typedef unsigned int __kernel_mode_t;
20970
20971
20972
20973 typedef int __kernel_pid_t;
20974
20975
20976
20977 typedef int __kernel_ipc_pid_t;
20978
20979
20980
20981 typedef unsigned int __kernel_uid_t;
20982 typedef unsigned int __kernel_gid_t;
20983
20984
20985
20986 typedef __kernel_long_t __kernel_suseconds_t;
20987
20988
20989
20990 typedef int __kernel_daddr_t;
20991
20992
20993
20994 typedef unsigned int __kernel_uid32_t;
20995 typedef unsigned int __kernel_gid32_t;
20996 # 72 "/usr/include/asm-generic/posix_types.h" 3 4
20997 typedef __kernel_ulong_t __kernel_size_t;
20998 typedef __kernel_long_t __kernel_ssize_t;
20999 typedef __kernel_long_t __kernel_ptrdiff_t;
21000
21001
21002
21003
21004 typedef struct {
21005 int val[2];
21006 } __kernel_fsid_t;
21007
21008
21009
21010
21011
21012 typedef __kernel_long_t __kernel_off_t;
21013 typedef long long __kernel_loff_t;
21014 typedef __kernel_long_t __kernel_old_time_t;
21015 typedef __kernel_long_t __kernel_time_t;
21016 typedef long long __kernel_time64_t;
21017 typedef __kernel_long_t __kernel_clock_t;
21018 typedef int __kernel_timer_t;
21019 typedef int __kernel_clockid_t;
21020 typedef char * __kernel_caddr_t;
21021 typedef unsigned short __kernel_uid16_t;
21022 typedef unsigned short __kernel_gid16_t;
21023 # 19 "/usr/include/x86_64-linux-gnu/asm/posix_types_64.h" 2 3 4
21024 # 8 "/usr/include/x86_64-linux-gnu/asm/posix_types.h" 2 3 4
21025 # 37 "/usr/include/linux/posix_types.h" 2 3 4
21026 # 6 "/usr/include/asm-generic/socket.h" 2 3 4
21027 # 1 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 1 3 4
21028 # 1 "/usr/include/asm-generic/sockios.h" 1 3 4
21029 # 2 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 2 3 4
21030 # 7 "/usr/include/asm-generic/socket.h" 2 3 4
21031 # 2 "/usr/include/x86_64-linux-gnu/asm/socket.h" 2 3 4
21032 # 390 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4
21033
21034
21035
21036
21037
21038
21039 struct linger
21040 {
21041 int l_onoff;
21042 int l_linger;
21043 };
21044 # 34 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4
21045
21046
21047 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h" 1 3 4
21048
21049
21050
21051
21052
21053 struct osockaddr
21054 {
21055 unsigned short int sa_family;
21056 unsigned char sa_data[14];
21057 };
21058 # 37 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4
21059
21060
21061
21062
21063 enum
21064 {
21065 SHUT_RD = 0,
21066
21067 SHUT_WR,
21068
21069 SHUT_RDWR
21070
21071 };
21072 # 102 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
21073 extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__ , __leaf__));
21074
21075
21076
21077
21078
21079 extern int socketpair (int __domain, int __type, int __protocol,
21080 int __fds[2]) __attribute__ ((__nothrow__ , __leaf__));
21081
21082
21083 extern int bind (int __fd, const struct sockaddr * __addr, socklen_t __len)
21084 __attribute__ ((__nothrow__ , __leaf__));
21085
21086
21087 extern int getsockname (int __fd, struct sockaddr *__restrict __addr,
21088 socklen_t *__restrict __len) __attribute__ ((__nothrow__ , __leaf__));
21089 # 126 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
21090 extern int connect (int __fd, const struct sockaddr * __addr, socklen_t __len);
21091
21092
21093
21094 extern int getpeername (int __fd, struct sockaddr *__restrict __addr,
21095 socklen_t *__restrict __len) __attribute__ ((__nothrow__ , __leaf__));
21096
21097
21098
21099
21100
21101
21102 extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags);
21103
21104
21105
21106
21107
21108
21109 extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags);
21110
21111
21112
21113
21114
21115
21116 extern ssize_t sendto (int __fd, const void *__buf, size_t __n,
21117 int __flags, const struct sockaddr * __addr,
21118 socklen_t __addr_len);
21119 # 163 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
21120 extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
21121 int __flags, struct sockaddr *__restrict __addr,
21122 socklen_t *__restrict __addr_len);
21123 # 174 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
21124 extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
21125 int __flags);
21126 # 216 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
21127 extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
21128 # 255 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
21129 extern int getsockopt (int __fd, int __level, int __optname,
21130 void *__restrict __optval,
21131 socklen_t *__restrict __optlen) __attribute__ ((__nothrow__ , __leaf__));
21132 # 277 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
21133 extern int setsockopt (int __fd, int __level, int __optname,
21134 const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__ , __leaf__));
21135 # 296 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
21136 extern int listen (int __fd, int __n) __attribute__ ((__nothrow__ , __leaf__));
21137 # 306 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
21138 extern int accept (int __fd, struct sockaddr *__restrict __addr,
21139 socklen_t *__restrict __addr_len);
21140 # 324 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
21141 extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__ , __leaf__));
21142
21143
21144
21145
21146 extern int sockatmark (int __fd) __attribute__ ((__nothrow__ , __leaf__));
21147
21148
21149
21150
21151
21152
21153
21154 extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__ , __leaf__));
21155
21156
21157
21158
21159
21160 # 1 "/usr/include/x86_64-linux-gnu/bits/socket2.h" 1 3 4
21161 # 23 "/usr/include/x86_64-linux-gnu/bits/socket2.h" 3 4
21162 extern ssize_t __recv_chk (int __fd, void *__buf, size_t __n, size_t __buflen,
21163 int __flags);
21164 extern ssize_t __recv_alias (int __fd, void *__buf, size_t __n, int __flags) __asm__ ("" "recv")
21165 ;
21166 extern ssize_t __recv_chk_warn (int __fd, void *__buf, size_t __n, size_t __buflen, int __flags) __asm__ ("" "__recv_chk")
21167
21168
21169 __attribute__((__warning__ ("recv called with bigger length than size of destination " "buffer")))
21170 ;
21171
21172 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) ssize_t
21173 recv (int __fd, void *__buf, size_t __n, int __flags)
21174 {
21175 size_t sz = __builtin_dynamic_object_size (__buf, 0);
21176 if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))) && (((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char)))))))
21177 return __recv_alias (__fd, __buf, __n, __flags);
21178 if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char)))))
21179 return __recv_chk_warn (__fd, __buf, __n, sz, __flags);
21180 return __recv_chk (__fd, __buf, __n, sz, __flags);
21181 }
21182
21183 extern ssize_t __recvfrom_chk (int __fd, void *__restrict __buf, size_t __n,
21184 size_t __buflen, int __flags,
21185 struct sockaddr *__restrict __addr,
21186 socklen_t *__restrict __addr_len);
21187 extern ssize_t __recvfrom_alias (int __fd, void *__restrict __buf, size_t __n, int __flags, struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len) __asm__ ("" "recvfrom")
21188
21189
21190 ;
21191 extern ssize_t __recvfrom_chk_warn (int __fd, void *__restrict __buf, size_t __n, size_t __buflen, int __flags, struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len) __asm__ ("" "__recvfrom_chk")
21192
21193
21194
21195
21196 __attribute__((__warning__ ("recvfrom called with bigger length than size of " "destination buffer")))
21197 ;
21198
21199 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) ssize_t
21200 recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
21201 struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len)
21202 {
21203 size_t sz = __builtin_dynamic_object_size (__buf, 0);
21204 if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))) && (((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char)))))))
21205 return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len);
21206 if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char)))))
21207 return __recvfrom_chk_warn (__fd, __buf, __n, sz, __flags, __addr,
21208 __addr_len);
21209 return __recvfrom_chk (__fd, __buf, __n, sz, __flags, __addr, __addr_len);
21210 }
21211 # 344 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4
21212
21213
21214
21215 # 24 "/usr/include/netinet/in.h" 2 3 4
21216
21217
21218
21219
21220
21221
21222 typedef uint32_t in_addr_t;
21223 struct in_addr
21224 {
21225 in_addr_t s_addr;
21226 };
21227
21228
21229 # 1 "/usr/include/x86_64-linux-gnu/bits/in.h" 1 3 4
21230 # 145 "/usr/include/x86_64-linux-gnu/bits/in.h" 3 4
21231 struct ip_opts
21232 {
21233 struct in_addr ip_dst;
21234 char ip_opts[40];
21235 };
21236
21237
21238 struct in_pktinfo
21239 {
21240 int ipi_ifindex;
21241 struct in_addr ipi_spec_dst;
21242 struct in_addr ipi_addr;
21243 };
21244 # 38 "/usr/include/netinet/in.h" 2 3 4
21245
21246
21247 enum
21248 {
21249 IPPROTO_IP = 0,
21250
21251 IPPROTO_ICMP = 1,
21252
21253 IPPROTO_IGMP = 2,
21254
21255 IPPROTO_IPIP = 4,
21256
21257 IPPROTO_TCP = 6,
21258
21259 IPPROTO_EGP = 8,
21260
21261 IPPROTO_PUP = 12,
21262
21263 IPPROTO_UDP = 17,
21264
21265 IPPROTO_IDP = 22,
21266
21267 IPPROTO_TP = 29,
21268
21269 IPPROTO_DCCP = 33,
21270
21271 IPPROTO_IPV6 = 41,
21272
21273 IPPROTO_RSVP = 46,
21274
21275 IPPROTO_GRE = 47,
21276
21277 IPPROTO_ESP = 50,
21278
21279 IPPROTO_AH = 51,
21280
21281 IPPROTO_MTP = 92,
21282
21283 IPPROTO_BEETPH = 94,
21284
21285 IPPROTO_ENCAP = 98,
21286
21287 IPPROTO_PIM = 103,
21288
21289 IPPROTO_COMP = 108,
21290
21291 IPPROTO_L2TP = 115,
21292
21293 IPPROTO_SCTP = 132,
21294
21295 IPPROTO_UDPLITE = 136,
21296
21297 IPPROTO_MPLS = 137,
21298
21299 IPPROTO_ETHERNET = 143,
21300
21301 IPPROTO_RAW = 255,
21302
21303 IPPROTO_MPTCP = 262,
21304
21305 IPPROTO_MAX
21306 };
21307
21308
21309
21310
21311
21312 enum
21313 {
21314 IPPROTO_HOPOPTS = 0,
21315
21316 IPPROTO_ROUTING = 43,
21317
21318 IPPROTO_FRAGMENT = 44,
21319
21320 IPPROTO_ICMPV6 = 58,
21321
21322 IPPROTO_NONE = 59,
21323
21324 IPPROTO_DSTOPTS = 60,
21325
21326 IPPROTO_MH = 135
21327
21328 };
21329
21330
21331
21332 typedef uint16_t in_port_t;
21333
21334
21335 enum
21336 {
21337 IPPORT_ECHO = 7,
21338 IPPORT_DISCARD = 9,
21339 IPPORT_SYSTAT = 11,
21340 IPPORT_DAYTIME = 13,
21341 IPPORT_NETSTAT = 15,
21342 IPPORT_FTP = 21,
21343 IPPORT_TELNET = 23,
21344 IPPORT_SMTP = 25,
21345 IPPORT_TIMESERVER = 37,
21346 IPPORT_NAMESERVER = 42,
21347 IPPORT_WHOIS = 43,
21348 IPPORT_MTP = 57,
21349
21350 IPPORT_TFTP = 69,
21351 IPPORT_RJE = 77,
21352 IPPORT_FINGER = 79,
21353 IPPORT_TTYLINK = 87,
21354 IPPORT_SUPDUP = 95,
21355
21356
21357 IPPORT_EXECSERVER = 512,
21358 IPPORT_LOGINSERVER = 513,
21359 IPPORT_CMDSERVER = 514,
21360 IPPORT_EFSSERVER = 520,
21361
21362
21363 IPPORT_BIFFUDP = 512,
21364 IPPORT_WHOSERVER = 513,
21365 IPPORT_ROUTESERVER = 520,
21366
21367
21368 IPPORT_RESERVED = 1024,
21369
21370
21371 IPPORT_USERRESERVED = 5000
21372 };
21373 # 221 "/usr/include/netinet/in.h" 3 4
21374 struct in6_addr
21375 {
21376 union
21377 {
21378 uint8_t __u6_addr8[16];
21379 uint16_t __u6_addr16[8];
21380 uint32_t __u6_addr32[4];
21381 } __in6_u;
21382
21383
21384
21385
21386
21387 };
21388
21389
21390 extern const struct in6_addr in6addr_any;
21391 extern const struct in6_addr in6addr_loopback;
21392 # 247 "/usr/include/netinet/in.h" 3 4
21393 struct sockaddr_in
21394 {
21395 sa_family_t sin_family;
21396 in_port_t sin_port;
21397 struct in_addr sin_addr;
21398
21399
21400 unsigned char sin_zero[sizeof (struct sockaddr)
21401 - (sizeof (unsigned short int))
21402 - sizeof (in_port_t)
21403 - sizeof (struct in_addr)];
21404 };
21405
21406
21407
21408 struct sockaddr_in6
21409 {
21410 sa_family_t sin6_family;
21411 in_port_t sin6_port;
21412 uint32_t sin6_flowinfo;
21413 struct in6_addr sin6_addr;
21414 uint32_t sin6_scope_id;
21415 };
21416
21417
21418
21419
21420 struct ip_mreq
21421 {
21422
21423 struct in_addr imr_multiaddr;
21424
21425
21426 struct in_addr imr_interface;
21427 };
21428
21429
21430 struct ip_mreqn
21431 {
21432
21433 struct in_addr imr_multiaddr;
21434
21435
21436 struct in_addr imr_address;
21437
21438
21439 int imr_ifindex;
21440 };
21441
21442 struct ip_mreq_source
21443 {
21444
21445 struct in_addr imr_multiaddr;
21446
21447
21448 struct in_addr imr_interface;
21449
21450
21451 struct in_addr imr_sourceaddr;
21452 };
21453
21454
21455
21456
21457 struct ipv6_mreq
21458 {
21459
21460 struct in6_addr ipv6mr_multiaddr;
21461
21462
21463 unsigned int ipv6mr_interface;
21464 };
21465
21466
21467
21468
21469 struct group_req
21470 {
21471
21472 uint32_t gr_interface;
21473
21474
21475 struct sockaddr_storage gr_group;
21476 };
21477
21478 struct group_source_req
21479 {
21480
21481 uint32_t gsr_interface;
21482
21483
21484 struct sockaddr_storage gsr_group;
21485
21486
21487 struct sockaddr_storage gsr_source;
21488 };
21489
21490
21491
21492 struct ip_msfilter
21493 {
21494
21495 struct in_addr imsf_multiaddr;
21496
21497
21498 struct in_addr imsf_interface;
21499
21500
21501 uint32_t imsf_fmode;
21502
21503
21504 uint32_t imsf_numsrc;
21505
21506 struct in_addr imsf_slist[1];
21507 };
21508
21509
21510
21511
21512
21513 struct group_filter
21514 {
21515
21516 uint32_t gf_interface;
21517
21518
21519 struct sockaddr_storage gf_group;
21520
21521
21522 uint32_t gf_fmode;
21523
21524
21525 uint32_t gf_numsrc;
21526
21527 struct sockaddr_storage gf_slist[1];
21528 };
21529 # 397 "/usr/include/netinet/in.h" 3 4
21530 extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
21531 extern uint16_t ntohs (uint16_t __netshort)
21532 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
21533 extern uint32_t htonl (uint32_t __hostlong)
21534 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
21535 extern uint16_t htons (uint16_t __hostshort)
21536 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
21537
21538
21539
21540
21541 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4
21542 # 409 "/usr/include/netinet/in.h" 2 3 4
21543 # 1 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 1 3 4
21544 # 410 "/usr/include/netinet/in.h" 2 3 4
21545 # 525 "/usr/include/netinet/in.h" 3 4
21546 extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__ , __leaf__));
21547
21548
21549 extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
21550 __attribute__ ((__nothrow__ , __leaf__));
21551 # 653 "/usr/include/netinet/in.h" 3 4
21552
21553 # 28 "/usr/include/netdb.h" 2 3 4
21554
21555
21556
21557
21558 # 1 "/usr/include/rpc/netdb.h" 1 3 4
21559 # 42 "/usr/include/rpc/netdb.h" 3 4
21560 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
21561 # 43 "/usr/include/rpc/netdb.h" 2 3 4
21562
21563
21564
21565 struct rpcent
21566 {
21567 char *r_name;
21568 char **r_aliases;
21569 int r_number;
21570 };
21571
21572 extern void setrpcent (int __stayopen) __attribute__ ((__nothrow__ , __leaf__));
21573 extern void endrpcent (void) __attribute__ ((__nothrow__ , __leaf__));
21574 extern struct rpcent *getrpcbyname (const char *__name) __attribute__ ((__nothrow__ , __leaf__));
21575 extern struct rpcent *getrpcbynumber (int __number) __attribute__ ((__nothrow__ , __leaf__));
21576 extern struct rpcent *getrpcent (void) __attribute__ ((__nothrow__ , __leaf__));
21577
21578
21579 extern int getrpcbyname_r (const char *__name, struct rpcent *__result_buf,
21580 char *__buffer, size_t __buflen,
21581 struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__));
21582
21583 extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf,
21584 char *__buffer, size_t __buflen,
21585 struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__));
21586
21587 extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer,
21588 size_t __buflen, struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__));
21589
21590
21591
21592 # 33 "/usr/include/netdb.h" 2 3 4
21593
21594
21595
21596
21597
21598
21599
21600 # 1 "/usr/include/x86_64-linux-gnu/bits/netdb.h" 1 3 4
21601 # 26 "/usr/include/x86_64-linux-gnu/bits/netdb.h" 3 4
21602 struct netent
21603 {
21604 char *n_name;
21605 char **n_aliases;
21606 int n_addrtype;
21607 uint32_t n_net;
21608 };
21609 # 41 "/usr/include/netdb.h" 2 3 4
21610 # 51 "/usr/include/netdb.h" 3 4
21611
21612
21613
21614
21615
21616
21617
21618
21619 extern int *__h_errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
21620 # 90 "/usr/include/netdb.h" 3 4
21621 extern void herror (const char *__str) __attribute__ ((__nothrow__ , __leaf__));
21622
21623
21624 extern const char *hstrerror (int __err_num) __attribute__ ((__nothrow__ , __leaf__));
21625
21626
21627
21628
21629 struct hostent
21630 {
21631 char *h_name;
21632 char **h_aliases;
21633 int h_addrtype;
21634 int h_length;
21635 char **h_addr_list;
21636
21637
21638
21639 };
21640
21641
21642
21643
21644
21645
21646 extern void sethostent (int __stay_open);
21647
21648
21649
21650
21651
21652 extern void endhostent (void);
21653
21654
21655
21656
21657
21658
21659 extern struct hostent *gethostent (void);
21660
21661
21662
21663
21664
21665
21666 extern struct hostent *gethostbyaddr (const void *__addr, __socklen_t __len,
21667 int __type);
21668
21669
21670
21671
21672
21673 extern struct hostent *gethostbyname (const char *__name);
21674 # 153 "/usr/include/netdb.h" 3 4
21675 extern struct hostent *gethostbyname2 (const char *__name, int __af);
21676 # 165 "/usr/include/netdb.h" 3 4
21677 extern int gethostent_r (struct hostent *__restrict __result_buf,
21678 char *__restrict __buf, size_t __buflen,
21679 struct hostent **__restrict __result,
21680 int *__restrict __h_errnop);
21681
21682 extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len,
21683 int __type,
21684 struct hostent *__restrict __result_buf,
21685 char *__restrict __buf, size_t __buflen,
21686 struct hostent **__restrict __result,
21687 int *__restrict __h_errnop);
21688
21689 extern int gethostbyname_r (const char *__restrict __name,
21690 struct hostent *__restrict __result_buf,
21691 char *__restrict __buf, size_t __buflen,
21692 struct hostent **__restrict __result,
21693 int *__restrict __h_errnop);
21694
21695 extern int gethostbyname2_r (const char *__restrict __name, int __af,
21696 struct hostent *__restrict __result_buf,
21697 char *__restrict __buf, size_t __buflen,
21698 struct hostent **__restrict __result,
21699 int *__restrict __h_errnop);
21700 # 196 "/usr/include/netdb.h" 3 4
21701 extern void setnetent (int __stay_open);
21702
21703
21704
21705
21706
21707 extern void endnetent (void);
21708
21709
21710
21711
21712
21713
21714 extern struct netent *getnetent (void);
21715
21716
21717
21718
21719
21720
21721 extern struct netent *getnetbyaddr (uint32_t __net, int __type);
21722
21723
21724
21725
21726
21727 extern struct netent *getnetbyname (const char *__name);
21728 # 235 "/usr/include/netdb.h" 3 4
21729 extern int getnetent_r (struct netent *__restrict __result_buf,
21730 char *__restrict __buf, size_t __buflen,
21731 struct netent **__restrict __result,
21732 int *__restrict __h_errnop);
21733
21734 extern int getnetbyaddr_r (uint32_t __net, int __type,
21735 struct netent *__restrict __result_buf,
21736 char *__restrict __buf, size_t __buflen,
21737 struct netent **__restrict __result,
21738 int *__restrict __h_errnop);
21739
21740 extern int getnetbyname_r (const char *__restrict __name,
21741 struct netent *__restrict __result_buf,
21742 char *__restrict __buf, size_t __buflen,
21743 struct netent **__restrict __result,
21744 int *__restrict __h_errnop);
21745
21746
21747
21748
21749 struct servent
21750 {
21751 char *s_name;
21752 char **s_aliases;
21753 int s_port;
21754 char *s_proto;
21755 };
21756
21757
21758
21759
21760
21761
21762 extern void setservent (int __stay_open);
21763
21764
21765
21766
21767
21768 extern void endservent (void);
21769
21770
21771
21772
21773
21774
21775 extern struct servent *getservent (void);
21776
21777
21778
21779
21780
21781
21782 extern struct servent *getservbyname (const char *__name, const char *__proto);
21783
21784
21785
21786
21787
21788
21789 extern struct servent *getservbyport (int __port, const char *__proto);
21790 # 306 "/usr/include/netdb.h" 3 4
21791 extern int getservent_r (struct servent *__restrict __result_buf,
21792 char *__restrict __buf, size_t __buflen,
21793 struct servent **__restrict __result);
21794
21795 extern int getservbyname_r (const char *__restrict __name,
21796 const char *__restrict __proto,
21797 struct servent *__restrict __result_buf,
21798 char *__restrict __buf, size_t __buflen,
21799 struct servent **__restrict __result);
21800
21801 extern int getservbyport_r (int __port, const char *__restrict __proto,
21802 struct servent *__restrict __result_buf,
21803 char *__restrict __buf, size_t __buflen,
21804 struct servent **__restrict __result);
21805
21806
21807
21808
21809 struct protoent
21810 {
21811 char *p_name;
21812 char **p_aliases;
21813 int p_proto;
21814 };
21815
21816
21817
21818
21819
21820
21821 extern void setprotoent (int __stay_open);
21822
21823
21824
21825
21826
21827 extern void endprotoent (void);
21828
21829
21830
21831
21832
21833
21834 extern struct protoent *getprotoent (void);
21835
21836
21837
21838
21839
21840 extern struct protoent *getprotobyname (const char *__name);
21841
21842
21843
21844
21845
21846 extern struct protoent *getprotobynumber (int __proto);
21847 # 372 "/usr/include/netdb.h" 3 4
21848 extern int getprotoent_r (struct protoent *__restrict __result_buf,
21849 char *__restrict __buf, size_t __buflen,
21850 struct protoent **__restrict __result);
21851
21852 extern int getprotobyname_r (const char *__restrict __name,
21853 struct protoent *__restrict __result_buf,
21854 char *__restrict __buf, size_t __buflen,
21855 struct protoent **__restrict __result);
21856
21857 extern int getprotobynumber_r (int __proto,
21858 struct protoent *__restrict __result_buf,
21859 char *__restrict __buf, size_t __buflen,
21860 struct protoent **__restrict __result);
21861 # 393 "/usr/include/netdb.h" 3 4
21862 extern int setnetgrent (const char *__netgroup);
21863
21864
21865
21866
21867
21868
21869
21870 extern void endnetgrent (void);
21871 # 410 "/usr/include/netdb.h" 3 4
21872 extern int getnetgrent (char **__restrict __hostp,
21873 char **__restrict __userp,
21874 char **__restrict __domainp);
21875 # 421 "/usr/include/netdb.h" 3 4
21876 extern int innetgr (const char *__netgroup, const char *__host,
21877 const char *__user, const char *__domain);
21878
21879
21880
21881
21882
21883
21884
21885 extern int getnetgrent_r (char **__restrict __hostp,
21886 char **__restrict __userp,
21887 char **__restrict __domainp,
21888 char *__restrict __buffer, size_t __buflen);
21889 # 449 "/usr/include/netdb.h" 3 4
21890 extern int rcmd (char **__restrict __ahost, unsigned short int __rport,
21891 const char *__restrict __locuser,
21892 const char *__restrict __remuser,
21893 const char *__restrict __cmd, int *__restrict __fd2p);
21894 # 461 "/usr/include/netdb.h" 3 4
21895 extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport,
21896 const char *__restrict __locuser,
21897 const char *__restrict __remuser,
21898 const char *__restrict __cmd, int *__restrict __fd2p,
21899 sa_family_t __af);
21900 # 477 "/usr/include/netdb.h" 3 4
21901 extern int rexec (char **__restrict __ahost, int __rport,
21902 const char *__restrict __name,
21903 const char *__restrict __pass,
21904 const char *__restrict __cmd, int *__restrict __fd2p);
21905 # 489 "/usr/include/netdb.h" 3 4
21906 extern int rexec_af (char **__restrict __ahost, int __rport,
21907 const char *__restrict __name,
21908 const char *__restrict __pass,
21909 const char *__restrict __cmd, int *__restrict __fd2p,
21910 sa_family_t __af);
21911 # 503 "/usr/include/netdb.h" 3 4
21912 extern int ruserok (const char *__rhost, int __suser,
21913 const char *__remuser, const char *__locuser);
21914 # 513 "/usr/include/netdb.h" 3 4
21915 extern int ruserok_af (const char *__rhost, int __suser,
21916 const char *__remuser, const char *__locuser,
21917 sa_family_t __af);
21918 # 526 "/usr/include/netdb.h" 3 4
21919 extern int iruserok (uint32_t __raddr, int __suser,
21920 const char *__remuser, const char *__locuser);
21921 # 537 "/usr/include/netdb.h" 3 4
21922 extern int iruserok_af (const void *__raddr, int __suser,
21923 const char *__remuser, const char *__locuser,
21924 sa_family_t __af);
21925 # 549 "/usr/include/netdb.h" 3 4
21926 extern int rresvport (int *__alport);
21927 # 558 "/usr/include/netdb.h" 3 4
21928 extern int rresvport_af (int *__alport, sa_family_t __af);
21929
21930
21931
21932
21933
21934
21935 struct addrinfo
21936 {
21937 int ai_flags;
21938 int ai_family;
21939 int ai_socktype;
21940 int ai_protocol;
21941 socklen_t ai_addrlen;
21942 struct sockaddr *ai_addr;
21943 char *ai_canonname;
21944 struct addrinfo *ai_next;
21945 };
21946 # 660 "/usr/include/netdb.h" 3 4
21947 extern int getaddrinfo (const char *__restrict __name,
21948 const char *__restrict __service,
21949 const struct addrinfo *__restrict __req,
21950 struct addrinfo **__restrict __pai);
21951
21952
21953 extern void freeaddrinfo (struct addrinfo *__ai) __attribute__ ((__nothrow__ , __leaf__));
21954
21955
21956 extern const char *gai_strerror (int __ecode) __attribute__ ((__nothrow__ , __leaf__));
21957
21958
21959
21960
21961
21962 extern int getnameinfo (const struct sockaddr *__restrict __sa,
21963 socklen_t __salen, char *__restrict __host,
21964 socklen_t __hostlen, char *__restrict __serv,
21965 socklen_t __servlen, int __flags);
21966 # 722 "/usr/include/netdb.h" 3 4
21967
21968 # 92 "include/internal/sockets.h" 2
21969 # 102 "include/internal/sockets.h"
21970 # 1 "/usr/include/x86_64-linux-gnu/sys/un.h" 1 3 4
21971 # 26 "/usr/include/x86_64-linux-gnu/sys/un.h" 3 4
21972
21973
21974
21975 struct sockaddr_un
21976 {
21977 sa_family_t sun_family;
21978 char sun_path[108];
21979 };
21980
21981
21982
21983 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4
21984 # 38 "/usr/include/x86_64-linux-gnu/sys/un.h" 2 3 4
21985
21986
21987
21988
21989
21990
21991
21992
21993 # 103 "include/internal/sockets.h" 2
21994 # 111 "include/internal/sockets.h"
21995 # 1 "/usr/include/arpa/inet.h" 1 3 4
21996 # 30 "/usr/include/arpa/inet.h" 3 4
21997
21998
21999
22000
22001 extern in_addr_t inet_addr (const char *__cp) __attribute__ ((__nothrow__ , __leaf__));
22002
22003
22004 extern in_addr_t inet_lnaof (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__));
22005
22006
22007
22008 extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host)
22009 __attribute__ ((__nothrow__ , __leaf__));
22010
22011
22012 extern in_addr_t inet_netof (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__));
22013
22014
22015
22016 extern in_addr_t inet_network (const char *__cp) __attribute__ ((__nothrow__ , __leaf__));
22017
22018
22019
22020 extern char *inet_ntoa (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__));
22021
22022
22023
22024
22025 extern int inet_pton (int __af, const char *__restrict __cp,
22026 void *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
22027
22028
22029
22030
22031 extern const char *inet_ntop (int __af, const void *__restrict __cp,
22032 char *__restrict __buf, socklen_t __len)
22033 __attribute__ ((__nothrow__ , __leaf__));
22034
22035
22036
22037
22038
22039
22040 extern int inet_aton (const char *__cp, struct in_addr *__inp) __attribute__ ((__nothrow__ , __leaf__));
22041
22042
22043
22044 extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__))
22045 __attribute__ ((__deprecated__ ("Use inet_ntop instead")));
22046
22047
22048
22049
22050 extern char *inet_net_ntop (int __af, const void *__cp, int __bits,
22051 char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
22052
22053
22054
22055
22056 extern int inet_net_pton (int __af, const char *__cp,
22057 void *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
22058
22059
22060
22061
22062 extern unsigned int inet_nsap_addr (const char *__cp,
22063 unsigned char *__buf, int __len) __attribute__ ((__nothrow__ , __leaf__));
22064
22065
22066
22067 extern char *inet_nsap_ntoa (int __len, const unsigned char *__cp,
22068 char *__buf) __attribute__ ((__nothrow__ , __leaf__));
22069
22070
22071
22072 # 112 "include/internal/sockets.h" 2
22073 # 1 "/usr/include/netinet/tcp.h" 1 3 4
22074 # 93 "/usr/include/netinet/tcp.h" 3 4
22075 typedef uint32_t tcp_seq;
22076
22077
22078
22079
22080 struct tcphdr
22081 {
22082 __extension__ union
22083 {
22084 struct
22085 {
22086 uint16_t th_sport;
22087 uint16_t th_dport;
22088 tcp_seq th_seq;
22089 tcp_seq th_ack;
22090
22091 uint8_t th_x2:4;
22092 uint8_t th_off:4;
22093
22094
22095
22096
22097
22098 uint8_t th_flags;
22099
22100
22101
22102
22103
22104
22105 uint16_t th_win;
22106 uint16_t th_sum;
22107 uint16_t th_urp;
22108 };
22109 struct
22110 {
22111 uint16_t source;
22112 uint16_t dest;
22113 uint32_t seq;
22114 uint32_t ack_seq;
22115
22116 uint16_t res1:4;
22117 uint16_t doff:4;
22118 uint16_t fin:1;
22119 uint16_t syn:1;
22120 uint16_t rst:1;
22121 uint16_t psh:1;
22122 uint16_t ack:1;
22123 uint16_t urg:1;
22124 uint16_t res2:2;
22125 # 156 "/usr/include/netinet/tcp.h" 3 4
22126 uint16_t window;
22127 uint16_t check;
22128 uint16_t urg_ptr;
22129 };
22130 };
22131 };
22132
22133 enum
22134 {
22135 TCP_ESTABLISHED = 1,
22136 TCP_SYN_SENT,
22137 TCP_SYN_RECV,
22138 TCP_FIN_WAIT1,
22139 TCP_FIN_WAIT2,
22140 TCP_TIME_WAIT,
22141 TCP_CLOSE,
22142 TCP_CLOSE_WAIT,
22143 TCP_LAST_ACK,
22144 TCP_LISTEN,
22145 TCP_CLOSING
22146 };
22147 # 217 "/usr/include/netinet/tcp.h" 3 4
22148 enum tcp_ca_state
22149 {
22150 TCP_CA_Open = 0,
22151 TCP_CA_Disorder = 1,
22152 TCP_CA_CWR = 2,
22153 TCP_CA_Recovery = 3,
22154 TCP_CA_Loss = 4
22155 };
22156
22157 struct tcp_info
22158 {
22159 uint8_t tcpi_state;
22160 uint8_t tcpi_ca_state;
22161 uint8_t tcpi_retransmits;
22162 uint8_t tcpi_probes;
22163 uint8_t tcpi_backoff;
22164 uint8_t tcpi_options;
22165 uint8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
22166
22167 uint32_t tcpi_rto;
22168 uint32_t tcpi_ato;
22169 uint32_t tcpi_snd_mss;
22170 uint32_t tcpi_rcv_mss;
22171
22172 uint32_t tcpi_unacked;
22173 uint32_t tcpi_sacked;
22174 uint32_t tcpi_lost;
22175 uint32_t tcpi_retrans;
22176 uint32_t tcpi_fackets;
22177
22178
22179 uint32_t tcpi_last_data_sent;
22180 uint32_t tcpi_last_ack_sent;
22181 uint32_t tcpi_last_data_recv;
22182 uint32_t tcpi_last_ack_recv;
22183
22184
22185 uint32_t tcpi_pmtu;
22186 uint32_t tcpi_rcv_ssthresh;
22187 uint32_t tcpi_rtt;
22188 uint32_t tcpi_rttvar;
22189 uint32_t tcpi_snd_ssthresh;
22190 uint32_t tcpi_snd_cwnd;
22191 uint32_t tcpi_advmss;
22192 uint32_t tcpi_reordering;
22193
22194 uint32_t tcpi_rcv_rtt;
22195 uint32_t tcpi_rcv_space;
22196
22197 uint32_t tcpi_total_retrans;
22198 };
22199 # 277 "/usr/include/netinet/tcp.h" 3 4
22200 struct tcp_md5sig
22201 {
22202 struct sockaddr_storage tcpm_addr;
22203 uint8_t tcpm_flags;
22204 uint8_t tcpm_prefixlen;
22205 uint16_t tcpm_keylen;
22206 int tcpm_ifindex;
22207 uint8_t tcpm_key[80];
22208 };
22209
22210
22211 struct tcp_repair_opt
22212 {
22213 uint32_t opt_code;
22214 uint32_t opt_val;
22215 };
22216
22217
22218 enum
22219 {
22220 TCP_NO_QUEUE,
22221 TCP_RECV_QUEUE,
22222 TCP_SEND_QUEUE,
22223 TCP_QUEUES_NR,
22224 };
22225 # 320 "/usr/include/netinet/tcp.h" 3 4
22226 struct tcp_cookie_transactions
22227 {
22228 uint16_t tcpct_flags;
22229 uint8_t __tcpct_pad1;
22230 uint8_t tcpct_cookie_desired;
22231 uint16_t tcpct_s_data_desired;
22232 uint16_t tcpct_used;
22233 uint8_t tcpct_value[536U];
22234 };
22235
22236
22237 struct tcp_repair_window
22238 {
22239 uint32_t snd_wl1;
22240 uint32_t snd_wnd;
22241 uint32_t max_window;
22242 uint32_t rcv_wnd;
22243 uint32_t rcv_wup;
22244 };
22245
22246
22247 struct tcp_zerocopy_receive
22248 {
22249 uint64_t address;
22250 uint32_t length;
22251 uint32_t recv_skip_hint;
22252 };
22253 # 113 "include/internal/sockets.h" 2
22254 # 121 "include/internal/sockets.h"
22255 # 1 "/usr/include/poll.h" 1 3 4
22256 # 1 "/usr/include/x86_64-linux-gnu/sys/poll.h" 1 3 4
22257 # 25 "/usr/include/x86_64-linux-gnu/sys/poll.h" 3 4
22258 # 1 "/usr/include/x86_64-linux-gnu/bits/poll.h" 1 3 4
22259 # 26 "/usr/include/x86_64-linux-gnu/sys/poll.h" 2 3 4
22260
22261
22262
22263
22264
22265
22266
22267 typedef unsigned long int nfds_t;
22268
22269
22270 struct pollfd
22271 {
22272 int fd;
22273 short int events;
22274 short int revents;
22275 };
22276
22277
22278
22279 # 54 "/usr/include/x86_64-linux-gnu/sys/poll.h" 3 4
22280 extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
22281 __attribute__ ((__access__ (__write_only__, 1)));
22282 # 82 "/usr/include/x86_64-linux-gnu/sys/poll.h" 3 4
22283
22284
22285
22286
22287
22288 # 1 "/usr/include/x86_64-linux-gnu/bits/poll2.h" 1 3 4
22289 # 24 "/usr/include/x86_64-linux-gnu/bits/poll2.h" 3 4
22290
22291
22292 extern int __poll_alias (struct pollfd *__fds, nfds_t __nfds, int __timeout) __asm__ ("" "poll")
22293 ;
22294 extern int __poll_chk (struct pollfd *__fds, nfds_t __nfds, int __timeout,
22295 long unsigned int __fdslen)
22296 __attribute__ ((__access__ (__write_only__, 1, 2)));
22297 extern int __poll_chk_warn (struct pollfd *__fds, nfds_t __nfds, int __timeout, long unsigned int __fdslen) __asm__ ("" "__poll_chk")
22298
22299
22300 __attribute__((__warning__ ("poll called with fds buffer too small file nfds entries")));
22301
22302 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__access__ (__write_only__, 1))) int
22303 poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
22304 {
22305 return (((__builtin_constant_p (__builtin_dynamic_object_size (__fds, 1)) && (__builtin_dynamic_object_size (__fds, 1)) == (long unsigned int) -1) || (((__typeof (__nfds)) 0 < (__typeof (__nfds)) -1 || (__builtin_constant_p (__nfds) && (__nfds) > 0)) && __builtin_constant_p ((((long unsigned int) (__nfds)) <= ((__builtin_dynamic_object_size (__fds, 1))) / ((sizeof (*__fds))))) && (((long unsigned int) (__nfds)) <= ((__builtin_dynamic_object_size (__fds, 1))) / ((sizeof (*__fds)))))) ? __poll_alias (__fds, __nfds, __timeout) : ((((__typeof (__nfds)) 0 < (__typeof (__nfds)) -1 || (__builtin_constant_p (__nfds) && (__nfds) > 0)) && __builtin_constant_p ((((long unsigned int) (__nfds)) <= (__builtin_dynamic_object_size (__fds, 1)) / (sizeof (*__fds)))) && !(((long unsigned int) (__nfds)) <= (__builtin_dynamic_object_size (__fds, 1)) / (sizeof (*__fds)))) ? __poll_chk_warn (__fds, __nfds, __timeout, __builtin_dynamic_object_size (__fds, 1)) : __poll_chk (__fds, __nfds, __timeout, __builtin_dynamic_object_size (__fds, 1))))
22306
22307 ;
22308 }
22309 # 95 "/usr/include/x86_64-linux-gnu/bits/poll2.h" 3 4
22310
22311 # 88 "/usr/include/x86_64-linux-gnu/sys/poll.h" 2 3 4
22312 # 2 "/usr/include/poll.h" 2 3 4
22313 # 122 "include/internal/sockets.h" 2
22314
22315
22316
22317
22318
22319 # 1 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 1 3 4
22320 # 23 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 3 4
22321
22322
22323
22324 # 1 "/usr/include/x86_64-linux-gnu/bits/ioctls.h" 1 3 4
22325 # 23 "/usr/include/x86_64-linux-gnu/bits/ioctls.h" 3 4
22326 # 1 "/usr/include/x86_64-linux-gnu/asm/ioctls.h" 1 3 4
22327 # 1 "/usr/include/asm-generic/ioctls.h" 1 3 4
22328
22329
22330
22331
22332 # 1 "/usr/include/linux/ioctl.h" 1 3 4
22333
22334
22335
22336
22337 # 1 "/usr/include/x86_64-linux-gnu/asm/ioctl.h" 1 3 4
22338 # 1 "/usr/include/asm-generic/ioctl.h" 1 3 4
22339 # 2 "/usr/include/x86_64-linux-gnu/asm/ioctl.h" 2 3 4
22340 # 6 "/usr/include/linux/ioctl.h" 2 3 4
22341 # 6 "/usr/include/asm-generic/ioctls.h" 2 3 4
22342 # 2 "/usr/include/x86_64-linux-gnu/asm/ioctls.h" 2 3 4
22343 # 24 "/usr/include/x86_64-linux-gnu/bits/ioctls.h" 2 3 4
22344 # 27 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 2 3 4
22345
22346
22347 # 1 "/usr/include/x86_64-linux-gnu/bits/ioctl-types.h" 1 3 4
22348 # 24 "/usr/include/x86_64-linux-gnu/bits/ioctl-types.h" 3 4
22349 # 1 "/usr/include/x86_64-linux-gnu/asm/ioctls.h" 1 3 4
22350 # 25 "/usr/include/x86_64-linux-gnu/bits/ioctl-types.h" 2 3 4
22351
22352
22353 struct winsize
22354 {
22355 unsigned short int ws_row;
22356 unsigned short int ws_col;
22357 unsigned short int ws_xpixel;
22358 unsigned short int ws_ypixel;
22359 };
22360
22361
22362 struct termio
22363 {
22364 unsigned short int c_iflag;
22365 unsigned short int c_oflag;
22366 unsigned short int c_cflag;
22367 unsigned short int c_lflag;
22368 unsigned char c_line;
22369 unsigned char c_cc[8];
22370 };
22371 # 30 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 2 3 4
22372
22373
22374
22375
22376
22377
22378 # 1 "/usr/include/x86_64-linux-gnu/sys/ttydefaults.h" 1 3 4
22379 # 37 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 2 3 4
22380
22381
22382
22383
22384
22385 extern int ioctl (int __fd, unsigned long int __request, ...) __attribute__ ((__nothrow__ , __leaf__));
22386 # 53 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 3 4
22387
22388 # 128 "include/internal/sockets.h" 2
22389 # 15 "include/internal/bio_addr.h" 2
22390
22391
22392
22393 # 17 "include/internal/bio_addr.h"
22394 union bio_addr_st {
22395 struct sockaddr sa;
22396
22397 struct sockaddr_in6 s_in6;
22398
22399 struct sockaddr_in s_in;
22400
22401 struct sockaddr_un s_un;
22402
22403 };
22404 # 17 "include/internal/quic_demux.h" 2
22405
22406 # 1 "include/internal/list.h" 1
22407 # 12 "include/internal/list.h"
22408
22409
22410
22411 # 1 "/usr/include/assert.h" 1 3 4
22412 # 16 "include/internal/list.h" 2
22413 # 19 "include/internal/quic_demux.h" 2
22414 # 89 "include/internal/quic_demux.h"
22415 struct quic_urxe_st {
22416 struct { QUIC_URXE *next, *prev; } ossl_list_urxe;
22417 # 100 "include/internal/quic_demux.h"
22418 size_t data_len, alloc_len;
22419
22420
22421
22422
22423
22424
22425 uint64_t processed, hpr_removed;
22426
22427
22428
22429
22430
22431 uint64_t datagram_id;
22432
22433
22434
22435
22436
22437
22438 BIO_ADDR peer, local;
22439
22440
22441
22442
22443
22444 OSSL_TIME time;
22445
22446
22447
22448
22449
22450 char deferred;
22451
22452
22453
22454
22455
22456 char demux_state;
22457 };
22458
22459
22460 static __attribute__((unused)) inline unsigned char *
22461 ossl_quic_urxe_data(const QUIC_URXE *e)
22462 {
22463 return (unsigned char *)&e[1];
22464 }
22465
22466 static __attribute__((unused)) inline unsigned char *
22467 ossl_quic_urxe_data_end(const QUIC_URXE *e)
22468 {
22469 return ossl_quic_urxe_data(e) + e->data_len;
22470 }
22471
22472
22473 typedef struct ossl_list_st_urxe OSSL_LIST_urxe; struct ossl_list_st_urxe { QUIC_URXE *alpha, *omega; size_t num_elems; }; static __attribute__((unused)) inline void ossl_list_urxe_init(OSSL_LIST_urxe *list) { memset(list, 0, sizeof(*list)); } static __attribute__((unused)) inline void ossl_list_urxe_init_elem(QUIC_URXE *elem) { memset(&elem->ossl_list_urxe, 0, sizeof(elem->ossl_list_urxe)); } static __attribute__((unused)) inline int ossl_list_urxe_is_empty(const OSSL_LIST_urxe *list) { return list->num_elems == 0; } static __attribute__((unused)) inline size_t ossl_list_urxe_num(const OSSL_LIST_urxe *list) { return list->num_elems; } static __attribute__((unused)) inline QUIC_URXE * ossl_list_urxe_head(const OSSL_LIST_urxe *list) {
22474 # 155 "include/internal/quic_demux.h" 3 4
22475 ((void) (0))
22476 # 155 "include/internal/quic_demux.h"
22477 ; return list->alpha; } static __attribute__((unused)) inline QUIC_URXE * ossl_list_urxe_tail(const OSSL_LIST_urxe *list) {
22478 # 155 "include/internal/quic_demux.h" 3 4
22479 ((void) (0))
22480 # 155 "include/internal/quic_demux.h"
22481 ; return list->omega; } static __attribute__((unused)) inline QUIC_URXE * ossl_list_urxe_next(const QUIC_URXE *elem) {
22482 # 155 "include/internal/quic_demux.h" 3 4
22483 ((void) (0))
22484 # 155 "include/internal/quic_demux.h"
22485 ; return elem->ossl_list_urxe.next; } static __attribute__((unused)) inline QUIC_URXE * ossl_list_urxe_prev(const QUIC_URXE *elem) {
22486 # 155 "include/internal/quic_demux.h" 3 4
22487 ((void) (0))
22488 # 155 "include/internal/quic_demux.h"
22489 ; return elem->ossl_list_urxe.prev; } static __attribute__((unused)) inline void ossl_list_urxe_remove(OSSL_LIST_urxe *list, QUIC_URXE *elem) {
22490 # 155 "include/internal/quic_demux.h" 3 4
22491 ((void) (0))
22492 # 155 "include/internal/quic_demux.h"
22493 ; if (list->alpha == elem) list->alpha = elem->ossl_list_urxe.next; if (list->omega == elem) list->omega = elem->ossl_list_urxe.prev; if (elem->ossl_list_urxe.prev !=
22494 # 155 "include/internal/quic_demux.h" 3 4
22495 ((void *)0)
22496 # 155 "include/internal/quic_demux.h"
22497 ) elem->ossl_list_urxe.prev->ossl_list_urxe.next = elem->ossl_list_urxe.next; if (elem->ossl_list_urxe.next !=
22498 # 155 "include/internal/quic_demux.h" 3 4
22499 ((void *)0)
22500 # 155 "include/internal/quic_demux.h"
22501 ) elem->ossl_list_urxe.next->ossl_list_urxe.prev = elem->ossl_list_urxe.prev; list->num_elems--; memset(&elem->ossl_list_urxe, 0, sizeof(elem->ossl_list_urxe)); } static __attribute__((unused)) inline void ossl_list_urxe_insert_head(OSSL_LIST_urxe *list, QUIC_URXE *elem) {
22502 # 155 "include/internal/quic_demux.h" 3 4
22503 ((void) (0))
22504 # 155 "include/internal/quic_demux.h"
22505 ; if (list->alpha !=
22506 # 155 "include/internal/quic_demux.h" 3 4
22507 ((void *)0)
22508 # 155 "include/internal/quic_demux.h"
22509 ) list->alpha->ossl_list_urxe.prev = elem; elem->ossl_list_urxe.next = list->alpha; elem->ossl_list_urxe.prev =
22510 # 155 "include/internal/quic_demux.h" 3 4
22511 ((void *)0)
22512 # 155 "include/internal/quic_demux.h"
22513 ; list->alpha = elem; if (list->omega ==
22514 # 155 "include/internal/quic_demux.h" 3 4
22515 ((void *)0)
22516 # 155 "include/internal/quic_demux.h"
22517 ) list->omega = elem; list->num_elems++; } static __attribute__((unused)) inline void ossl_list_urxe_insert_tail(OSSL_LIST_urxe *list, QUIC_URXE *elem) {
22518 # 155 "include/internal/quic_demux.h" 3 4
22519 ((void) (0))
22520 # 155 "include/internal/quic_demux.h"
22521 ; if (list->omega !=
22522 # 155 "include/internal/quic_demux.h" 3 4
22523 ((void *)0)
22524 # 155 "include/internal/quic_demux.h"
22525 ) list->omega->ossl_list_urxe.next = elem; elem->ossl_list_urxe.prev = list->omega; elem->ossl_list_urxe.next =
22526 # 155 "include/internal/quic_demux.h" 3 4
22527 ((void *)0)
22528 # 155 "include/internal/quic_demux.h"
22529 ; list->omega = elem; if (list->alpha ==
22530 # 155 "include/internal/quic_demux.h" 3 4
22531 ((void *)0)
22532 # 155 "include/internal/quic_demux.h"
22533 ) list->alpha = elem; list->num_elems++; } static __attribute__((unused)) inline void ossl_list_urxe_insert_before(OSSL_LIST_urxe *list, QUIC_URXE *e, QUIC_URXE *elem) {
22534 # 155 "include/internal/quic_demux.h" 3 4
22535 ((void) (0))
22536 # 155 "include/internal/quic_demux.h"
22537 ; elem->ossl_list_urxe.next = e; elem->ossl_list_urxe.prev = e->ossl_list_urxe.prev; if (e->ossl_list_urxe.prev !=
22538 # 155 "include/internal/quic_demux.h" 3 4
22539 ((void *)0)
22540 # 155 "include/internal/quic_demux.h"
22541 ) e->ossl_list_urxe.prev->ossl_list_urxe.next = elem; e->ossl_list_urxe.prev = elem; if (list->alpha == e) list->alpha = elem; list->num_elems++; } static __attribute__((unused)) inline void ossl_list_urxe_insert_after(OSSL_LIST_urxe *list, QUIC_URXE *e, QUIC_URXE *elem) {
22542 # 155 "include/internal/quic_demux.h" 3 4
22543 ((void) (0))
22544 # 155 "include/internal/quic_demux.h"
22545 ; elem->ossl_list_urxe.prev = e; elem->ossl_list_urxe.next = e->ossl_list_urxe.next; if (e->ossl_list_urxe.next !=
22546 # 155 "include/internal/quic_demux.h" 3 4
22547 ((void *)0)
22548 # 155 "include/internal/quic_demux.h"
22549 ) e->ossl_list_urxe.next->ossl_list_urxe.prev = elem; e->ossl_list_urxe.next = elem; if (list->omega == e) list->omega = elem; list->num_elems++; } struct ossl_list_st_urxe;
22550 typedef OSSL_LIST_urxe QUIC_URXE_LIST;
22551
22552
22553
22554
22555
22556 void ossl_quic_urxe_remove(QUIC_URXE_LIST *l, QUIC_URXE *e);
22557 void ossl_quic_urxe_insert_head(QUIC_URXE_LIST *l, QUIC_URXE *e);
22558 void ossl_quic_urxe_insert_tail(QUIC_URXE_LIST *l, QUIC_URXE *e);
22559 # 183 "include/internal/quic_demux.h"
22560 typedef void (ossl_quic_demux_cb_fn)(QUIC_URXE *e, void *arg,
22561 const QUIC_CONN_ID *dcid);
22562 # 198 "include/internal/quic_demux.h"
22563 QUIC_DEMUX *ossl_quic_demux_new(BIO *net_bio,
22564 size_t short_conn_id_len,
22565 OSSL_TIME (*now)(void *arg),
22566 void *now_arg);
22567
22568
22569
22570
22571
22572 void ossl_quic_demux_free(QUIC_DEMUX *demux);
22573
22574
22575
22576
22577
22578 void ossl_quic_demux_set_bio(QUIC_DEMUX *demux, BIO *net_bio);
22579
22580
22581
22582
22583 int ossl_quic_demux_set_mtu(QUIC_DEMUX *demux, unsigned int mtu);
22584 # 230 "include/internal/quic_demux.h"
22585 void ossl_quic_demux_set_default_handler(QUIC_DEMUX *demux,
22586 ossl_quic_demux_cb_fn *cb,
22587 void *cb_arg);
22588
22589
22590
22591
22592
22593
22594 void ossl_quic_demux_release_urxe(QUIC_DEMUX *demux,
22595 QUIC_URXE *e);
22596 # 253 "include/internal/quic_demux.h"
22597 void ossl_quic_demux_reinject_urxe(QUIC_DEMUX *demux,
22598 QUIC_URXE *e);
22599 # 280 "include/internal/quic_demux.h"
22600 int ossl_quic_demux_pump(QUIC_DEMUX *demux);
22601 # 291 "include/internal/quic_demux.h"
22602 int ossl_quic_demux_inject(QUIC_DEMUX *demux,
22603 const unsigned char *buf,
22604 size_t buf_len,
22605 const BIO_ADDR *peer,
22606 const BIO_ADDR *local);
22607
22608
22609
22610
22611 int ossl_quic_demux_has_pending(const QUIC_DEMUX *demux);
22612 # 19 "include/internal/quic_record_rx.h" 2
22613
22614
22615
22616
22617
22618
22619
22620 typedef struct ossl_qrx_st OSSL_QRX;
22621
22622 typedef struct ossl_qrx_args_st {
22623 OSSL_LIB_CTX *libctx;
22624 const char *propq;
22625
22626
22627 QUIC_DEMUX *demux;
22628
22629
22630 size_t short_conn_id_len;
22631
22632
22633
22634
22635
22636 size_t max_deferred;
22637
22638
22639 QUIC_PN init_largest_pn[QUIC_PN_SPACE_NUM];
22640
22641
22642 unsigned char init_key_phase_bit;
22643 } OSSL_QRX_ARGS;
22644
22645
22646 OSSL_QRX *ossl_qrx_new(const OSSL_QRX_ARGS *args);
22647 # 62 "include/internal/quic_record_rx.h"
22648 void ossl_qrx_free(OSSL_QRX *qrx);
22649
22650
22651 void ossl_qrx_set_msg_callback(OSSL_QRX *qrx, ossl_msg_cb msg_callback,
22652 SSL *msg_callback_ssl);
22653 void ossl_qrx_set_msg_callback_arg(OSSL_QRX *qrx,
22654 void *msg_callback_arg);
22655 # 159 "include/internal/quic_record_rx.h"
22656 int ossl_qrx_provide_secret(OSSL_QRX *qrx,
22657 uint32_t enc_level,
22658 uint32_t suite_id,
22659 EVP_MD *md,
22660 const unsigned char *secret,
22661 size_t secret_len);
22662 # 174 "include/internal/quic_record_rx.h"
22663 int ossl_qrx_discard_enc_level(OSSL_QRX *qrx, uint32_t enc_level);
22664
22665
22666
22667
22668
22669
22670
22671 struct ossl_qrx_pkt_st {
22672
22673
22674
22675
22676
22677 QUIC_PKT_HDR *hdr;
22678
22679
22680
22681
22682
22683
22684 const BIO_ADDR *peer;
22685
22686
22687
22688
22689
22690 const BIO_ADDR *local;
22691
22692
22693
22694
22695
22696
22697
22698 size_t datagram_len;
22699
22700
22701 QUIC_PN pn;
22702
22703
22704
22705
22706
22707 OSSL_TIME time;
22708
22709
22710 OSSL_QRX *qrx;
22711
22712
22713
22714
22715
22716 uint64_t key_epoch;
22717
22718
22719
22720
22721
22722 uint64_t datagram_id;
22723 };
22724 # 250 "include/internal/quic_record_rx.h"
22725 int ossl_qrx_read_pkt(OSSL_QRX *qrx, OSSL_QRX_PKT **pkt);
22726
22727
22728
22729
22730
22731 void ossl_qrx_pkt_release(OSSL_QRX_PKT *pkt);
22732
22733
22734 void ossl_qrx_pkt_up_ref(OSSL_QRX_PKT *pkt);
22735
22736
22737
22738
22739
22740 int ossl_qrx_processed_read_pending(OSSL_QRX *qrx);
22741 # 274 "include/internal/quic_record_rx.h"
22742 int ossl_qrx_unprocessed_read_pending(OSSL_QRX *qrx);
22743 # 288 "include/internal/quic_record_rx.h"
22744 uint64_t ossl_qrx_get_bytes_received(OSSL_QRX *qrx, int clear);
22745 # 304 "include/internal/quic_record_rx.h"
22746 typedef int (ossl_qrx_late_validation_cb)(QUIC_PN pn, int pn_space,
22747 void *arg);
22748
22749 int ossl_qrx_set_late_validation_cb(OSSL_QRX *qrx,
22750 ossl_qrx_late_validation_cb *cb,
22751 void *cb_arg);
22752 # 318 "include/internal/quic_record_rx.h"
22753 void ossl_qrx_inject_urxe(OSSL_QRX *qrx, QUIC_URXE *e);
22754 # 329 "include/internal/quic_record_rx.h"
22755 void ossl_qrx_allow_1rtt_processing(OSSL_QRX *qrx);
22756 # 484 "include/internal/quic_record_rx.h"
22757 uint64_t ossl_qrx_get_key_epoch(OSSL_QRX *qrx);
22758 # 494 "include/internal/quic_record_rx.h"
22759 typedef void (ossl_qrx_key_update_cb)(QUIC_PN pn, void *arg);
22760
22761 int ossl_qrx_set_key_update_cb(OSSL_QRX *qrx,
22762 ossl_qrx_key_update_cb *cb, void *cb_arg);
22763 # 517 "include/internal/quic_record_rx.h"
22764 int ossl_qrx_key_update_timeout(OSSL_QRX *qrx, int normal);
22765 # 537 "include/internal/quic_record_rx.h"
22766 uint64_t ossl_qrx_get_cur_forged_pkt_count(OSSL_QRX *qrx);
22767
22768
22769
22770
22771
22772 uint64_t ossl_qrx_get_max_forged_pkt_count(OSSL_QRX *qrx,
22773 uint32_t enc_level);
22774 # 16 "include/internal/quic_ssl.h" 2
22775 # 1 "include/internal/quic_ackm.h" 1
22776 # 12 "include/internal/quic_ackm.h"
22777 # 1 "include/internal/quic_statm.h" 1
22778 # 19 "include/internal/quic_statm.h"
22779 struct ossl_statm_st {
22780 OSSL_TIME smoothed_rtt, latest_rtt, min_rtt, rtt_variance;
22781 char have_first_sample;
22782 };
22783
22784 typedef struct ossl_rtt_info_st {
22785
22786 OSSL_TIME smoothed_rtt, latest_rtt, rtt_variance, min_rtt;
22787 } OSSL_RTT_INFO;
22788
22789 int ossl_statm_init(OSSL_STATM *statm);
22790
22791 void ossl_statm_destroy(OSSL_STATM *statm);
22792
22793 void ossl_statm_get_rtt_info(OSSL_STATM *statm, OSSL_RTT_INFO *rtt_info);
22794
22795 void ossl_statm_update_rtt(OSSL_STATM *statm,
22796 OSSL_TIME ack_delay,
22797 OSSL_TIME override_latest_rtt);
22798 # 13 "include/internal/quic_ackm.h" 2
22799 # 1 "include/internal/quic_cc.h" 1
22800 # 18 "include/internal/quic_cc.h"
22801 typedef struct ossl_cc_ack_info_st {
22802
22803 OSSL_TIME tx_time;
22804
22805
22806 size_t tx_size;
22807 } OSSL_CC_ACK_INFO;
22808
22809 typedef struct ossl_cc_loss_info_st {
22810
22811 OSSL_TIME tx_time;
22812
22813
22814 size_t tx_size;
22815 } OSSL_CC_LOSS_INFO;
22816
22817 typedef struct ossl_cc_ecn_info_st {
22818
22819
22820
22821
22822 OSSL_TIME largest_acked_time;
22823 } OSSL_CC_ECN_INFO;
22824 # 82 "include/internal/quic_cc.h"
22825 struct ossl_cc_method_st {
22826
22827
22828
22829 OSSL_CC_DATA *(*new)(OSSL_TIME (*now_cb)(void *arg),
22830 void *now_cb_arg);
22831
22832 void (*free)(OSSL_CC_DATA *ccdata);
22833
22834
22835
22836
22837 void (*reset)(OSSL_CC_DATA *ccdata);
22838 # 103 "include/internal/quic_cc.h"
22839 int (*set_input_params)(OSSL_CC_DATA *ccdata,
22840 const OSSL_PARAM *params);
22841 # 120 "include/internal/quic_cc.h"
22842 int (*bind_diagnostics)(OSSL_CC_DATA *ccdata,
22843 OSSL_PARAM *params);
22844 # 132 "include/internal/quic_cc.h"
22845 int (*unbind_diagnostics)(OSSL_CC_DATA *ccdata,
22846 OSSL_PARAM *params);
22847
22848
22849
22850
22851
22852
22853
22854 uint64_t (*get_tx_allowance)(OSSL_CC_DATA *ccdata);
22855
22856
22857
22858
22859
22860
22861
22862 OSSL_TIME (*get_wakeup_deadline)(OSSL_CC_DATA *ccdata);
22863
22864
22865
22866
22867
22868
22869 int (*on_data_sent)(OSSL_CC_DATA *ccdata,
22870 uint64_t num_bytes);
22871
22872
22873
22874
22875
22876 int (*on_data_acked)(OSSL_CC_DATA *ccdata,
22877 const OSSL_CC_ACK_INFO *info);
22878 # 179 "include/internal/quic_cc.h"
22879 int (*on_data_lost)(OSSL_CC_DATA *ccdata,
22880 const OSSL_CC_LOSS_INFO *info);
22881
22882
22883
22884
22885
22886
22887
22888 int (*on_data_lost_finished)(OSSL_CC_DATA *ccdata, uint32_t flags);
22889
22890
22891
22892
22893
22894
22895 int (*on_data_invalidated)(OSSL_CC_DATA *ccdata,
22896 uint64_t num_bytes);
22897 # 209 "include/internal/quic_cc.h"
22898 int (*on_ecn)(OSSL_CC_DATA *ccdata,
22899 const OSSL_CC_ECN_INFO *info);
22900 };
22901
22902 extern const OSSL_CC_METHOD ossl_cc_dummy_method;
22903 extern const OSSL_CC_METHOD ossl_cc_newreno_method;
22904 # 14 "include/internal/quic_ackm.h" 2
22905
22906 # 1 "include/internal/quic_wire.h" 1
22907 # 12 "include/internal/quic_wire.h"
22908
22909 # 90 "include/internal/quic_wire.h"
22910 const char *ossl_quic_frame_type_to_string(uint64_t frame_type);
22911
22912 static __attribute__((unused)) inline int
22913 ossl_quic_frame_type_is_ack_eliciting(uint64_t frame_type)
22914 {
22915 switch (frame_type) {
22916 case 0x00:
22917 case 0x02:
22918 case 0x03:
22919 case 0x1C:
22920 case 0x1D:
22921 return 0;
22922 default:
22923 return 1;
22924 }
22925 }
22926 # 132 "include/internal/quic_wire.h"
22927 typedef struct ossl_quic_ack_range_st {
22928
22929
22930
22931
22932 QUIC_PN start, end;
22933 } OSSL_QUIC_ACK_RANGE;
22934
22935 typedef struct ossl_quic_frame_ack_st {
22936 # 156 "include/internal/quic_wire.h"
22937 OSSL_QUIC_ACK_RANGE *ack_ranges;
22938 size_t num_ack_ranges;
22939
22940 OSSL_TIME delay_time;
22941 uint64_t ect0, ect1, ecnce;
22942 unsigned int ecn_present : 1;
22943 } OSSL_QUIC_FRAME_ACK;
22944
22945
22946 int ossl_quic_frame_ack_contains_pn(const OSSL_QUIC_FRAME_ACK *ack, QUIC_PN pn);
22947
22948
22949 typedef struct ossl_quic_frame_stream_st {
22950 uint64_t stream_id;
22951 uint64_t offset;
22952 uint64_t len;
22953 const unsigned char *data;
22954 # 183 "include/internal/quic_wire.h"
22955 unsigned int has_explicit_len : 1;
22956
22957
22958 unsigned int is_fin : 1;
22959 } OSSL_QUIC_FRAME_STREAM;
22960
22961
22962 typedef struct ossl_quic_frame_crypto_st {
22963 uint64_t offset;
22964 uint64_t len;
22965 const unsigned char *data;
22966 } OSSL_QUIC_FRAME_CRYPTO;
22967
22968
22969 typedef struct ossl_quic_frame_reset_stream_st {
22970 uint64_t stream_id;
22971 uint64_t app_error_code;
22972 uint64_t final_size;
22973 } OSSL_QUIC_FRAME_RESET_STREAM;
22974
22975
22976 typedef struct ossl_quic_frame_stop_sending_st {
22977 uint64_t stream_id;
22978 uint64_t app_error_code;
22979 } OSSL_QUIC_FRAME_STOP_SENDING;
22980
22981
22982 typedef struct ossl_quic_frame_new_conn_id_st {
22983 uint64_t seq_num;
22984 uint64_t retire_prior_to;
22985 QUIC_CONN_ID conn_id;
22986 QUIC_STATELESS_RESET_TOKEN stateless_reset;
22987 } OSSL_QUIC_FRAME_NEW_CONN_ID;
22988
22989
22990 typedef struct ossl_quic_frame_conn_close_st {
22991 unsigned int is_app : 1;
22992 uint64_t error_code;
22993 uint64_t frame_type;
22994 char *reason;
22995 size_t reason_len;
22996 } OSSL_QUIC_FRAME_CONN_CLOSE;
22997 # 238 "include/internal/quic_wire.h"
22998 int ossl_quic_wire_encode_padding(WPACKET *pkt, size_t num_bytes);
22999
23000
23001
23002
23003
23004 int ossl_quic_wire_encode_frame_ping(WPACKET *pkt);
23005 # 260 "include/internal/quic_wire.h"
23006 int ossl_quic_wire_encode_frame_ack(WPACKET *pkt,
23007 uint32_t ack_delay_exponent,
23008 const OSSL_QUIC_FRAME_ACK *ack);
23009
23010
23011
23012
23013
23014 int ossl_quic_wire_encode_frame_reset_stream(WPACKET *pkt,
23015 const OSSL_QUIC_FRAME_RESET_STREAM *f);
23016
23017
23018
23019
23020
23021 int ossl_quic_wire_encode_frame_stop_sending(WPACKET *pkt,
23022 const OSSL_QUIC_FRAME_STOP_SENDING *f);
23023
23024
23025
23026
23027
23028
23029
23030 int ossl_quic_wire_encode_frame_crypto_hdr(WPACKET *hdr,
23031 const OSSL_QUIC_FRAME_CRYPTO *f);
23032
23033
23034
23035
23036
23037
23038 size_t ossl_quic_wire_get_encoded_frame_len_crypto_hdr(const OSSL_QUIC_FRAME_CRYPTO *f);
23039 # 302 "include/internal/quic_wire.h"
23040 void *ossl_quic_wire_encode_frame_crypto(WPACKET *pkt,
23041 const OSSL_QUIC_FRAME_CRYPTO *f);
23042
23043
23044
23045
23046 int ossl_quic_wire_encode_frame_new_token(WPACKET *pkt,
23047 const unsigned char *token,
23048 size_t token_len);
23049 # 327 "include/internal/quic_wire.h"
23050 int ossl_quic_wire_encode_frame_stream_hdr(WPACKET *pkt,
23051 const OSSL_QUIC_FRAME_STREAM *f);
23052
23053
23054
23055
23056
23057
23058 size_t ossl_quic_wire_get_encoded_frame_len_stream_hdr(const OSSL_QUIC_FRAME_STREAM *f);
23059 # 347 "include/internal/quic_wire.h"
23060 void *ossl_quic_wire_encode_frame_stream(WPACKET *pkt,
23061 const OSSL_QUIC_FRAME_STREAM *f);
23062
23063
23064
23065
23066 int ossl_quic_wire_encode_frame_max_data(WPACKET *pkt,
23067 uint64_t max_data);
23068
23069
23070
23071
23072 int ossl_quic_wire_encode_frame_max_stream_data(WPACKET *pkt,
23073 uint64_t stream_id,
23074 uint64_t max_data);
23075 # 370 "include/internal/quic_wire.h"
23076 int ossl_quic_wire_encode_frame_max_streams(WPACKET *pkt,
23077 char is_uni,
23078 uint64_t max_streams);
23079
23080
23081
23082
23083 int ossl_quic_wire_encode_frame_data_blocked(WPACKET *pkt,
23084 uint64_t max_data);
23085
23086
23087
23088
23089 int ossl_quic_wire_encode_frame_stream_data_blocked(WPACKET *pkt,
23090 uint64_t stream_id,
23091 uint64_t max_stream_data);
23092
23093
23094
23095
23096
23097
23098
23099 int ossl_quic_wire_encode_frame_streams_blocked(WPACKET *pkt,
23100 char is_uni,
23101 uint64_t max_streams);
23102 # 404 "include/internal/quic_wire.h"
23103 int ossl_quic_wire_encode_frame_new_conn_id(WPACKET *pkt,
23104 const OSSL_QUIC_FRAME_NEW_CONN_ID *f);
23105
23106
23107
23108
23109 int ossl_quic_wire_encode_frame_retire_conn_id(WPACKET *pkt,
23110 uint64_t seq_num);
23111
23112
23113
23114
23115 int ossl_quic_wire_encode_frame_path_challenge(WPACKET *pkt,
23116 uint64_t data);
23117
23118
23119
23120
23121 int ossl_quic_wire_encode_frame_path_response(WPACKET *pkt,
23122 uint64_t data);
23123 # 434 "include/internal/quic_wire.h"
23124 int ossl_quic_wire_encode_frame_conn_close(WPACKET *pkt,
23125 const OSSL_QUIC_FRAME_CONN_CLOSE *f);
23126
23127
23128
23129
23130
23131 int ossl_quic_wire_encode_frame_handshake_done(WPACKET *pkt);
23132 # 453 "include/internal/quic_wire.h"
23133 unsigned char *ossl_quic_wire_encode_transport_param_bytes(WPACKET *pkt,
23134 uint64_t id,
23135 const unsigned char *value,
23136 size_t value_len);
23137
23138
23139
23140
23141
23142 int ossl_quic_wire_encode_transport_param_int(WPACKET *pkt,
23143 uint64_t id,
23144 uint64_t value);
23145
23146
23147
23148
23149
23150 int ossl_quic_wire_encode_transport_param_cid(WPACKET *wpkt,
23151 uint64_t id,
23152 const QUIC_CONN_ID *cid);
23153 # 498 "include/internal/quic_wire.h"
23154 int ossl_quic_wire_peek_frame_header(PACKET *pkt, uint64_t *type,
23155 int *was_minimal);
23156
23157
23158
23159
23160
23161 int ossl_quic_wire_skip_frame_header(PACKET *pkt, uint64_t *type);
23162 # 515 "include/internal/quic_wire.h"
23163 int ossl_quic_wire_peek_frame_ack_num_ranges(const PACKET *pkt,
23164 uint64_t *total_ranges);
23165 # 545 "include/internal/quic_wire.h"
23166 int ossl_quic_wire_decode_frame_ack(PACKET *pkt,
23167 uint32_t ack_delay_exponent,
23168 OSSL_QUIC_FRAME_ACK *ack,
23169 uint64_t *total_ranges);
23170
23171
23172
23173
23174 int ossl_quic_wire_decode_frame_reset_stream(PACKET *pkt,
23175 OSSL_QUIC_FRAME_RESET_STREAM *f);
23176
23177
23178
23179
23180 int ossl_quic_wire_decode_frame_stop_sending(PACKET *pkt,
23181 OSSL_QUIC_FRAME_STOP_SENDING *f);
23182 # 570 "include/internal/quic_wire.h"
23183 int ossl_quic_wire_decode_frame_crypto(PACKET *pkt, int nodata,
23184 OSSL_QUIC_FRAME_CRYPTO *f);
23185
23186
23187
23188
23189
23190 int ossl_quic_wire_decode_frame_new_token(PACKET *pkt,
23191 const unsigned char **token,
23192 size_t *token_len);
23193 # 610 "include/internal/quic_wire.h"
23194 int ossl_quic_wire_decode_frame_stream(PACKET *pkt, int nodata,
23195 OSSL_QUIC_FRAME_STREAM *f);
23196
23197
23198
23199
23200
23201 int ossl_quic_wire_decode_frame_max_data(PACKET *pkt,
23202 uint64_t *max_data);
23203
23204
23205
23206
23207
23208 int ossl_quic_wire_decode_frame_max_stream_data(PACKET *pkt,
23209 uint64_t *stream_id,
23210 uint64_t *max_stream_data);
23211 # 635 "include/internal/quic_wire.h"
23212 int ossl_quic_wire_decode_frame_max_streams(PACKET *pkt,
23213 uint64_t *max_streams);
23214
23215
23216
23217
23218
23219 int ossl_quic_wire_decode_frame_data_blocked(PACKET *pkt,
23220 uint64_t *max_data);
23221
23222
23223
23224
23225
23226 int ossl_quic_wire_decode_frame_stream_data_blocked(PACKET *pkt,
23227 uint64_t *stream_id,
23228 uint64_t *max_stream_data);
23229 # 661 "include/internal/quic_wire.h"
23230 int ossl_quic_wire_decode_frame_streams_blocked(PACKET *pkt,
23231 uint64_t *max_streams);
23232 # 674 "include/internal/quic_wire.h"
23233 int ossl_quic_wire_decode_frame_new_conn_id(PACKET *pkt,
23234 OSSL_QUIC_FRAME_NEW_CONN_ID *f);
23235
23236
23237
23238
23239
23240 int ossl_quic_wire_decode_frame_retire_conn_id(PACKET *pkt,
23241 uint64_t *seq_num);
23242
23243
23244
23245
23246 int ossl_quic_wire_decode_frame_path_challenge(PACKET *pkt,
23247 uint64_t *data);
23248
23249
23250
23251
23252 int ossl_quic_wire_decode_frame_path_response(PACKET *pkt,
23253 uint64_t *data);
23254 # 709 "include/internal/quic_wire.h"
23255 int ossl_quic_wire_decode_frame_conn_close(PACKET *pkt,
23256 OSSL_QUIC_FRAME_CONN_CLOSE *f);
23257
23258
23259
23260
23261
23262
23263 size_t ossl_quic_wire_decode_padding(PACKET *pkt);
23264
23265
23266
23267
23268 int ossl_quic_wire_decode_frame_ping(PACKET *pkt);
23269
23270
23271
23272
23273 int ossl_quic_wire_decode_frame_handshake_done(PACKET *pkt);
23274
23275
23276
23277
23278
23279 int ossl_quic_wire_peek_transport_param(PACKET *pkt, uint64_t *id);
23280 # 745 "include/internal/quic_wire.h"
23281 const unsigned char *ossl_quic_wire_decode_transport_param_bytes(PACKET *pkt,
23282 uint64_t *id,
23283 size_t *len);
23284
23285
23286
23287
23288
23289
23290
23291 int ossl_quic_wire_decode_transport_param_int(PACKET *pkt,
23292 uint64_t *id,
23293 uint64_t *value);
23294
23295
23296
23297
23298
23299
23300
23301 int ossl_quic_wire_decode_transport_param_cid(PACKET *pkt,
23302 uint64_t *id,
23303 QUIC_CONN_ID *cid);
23304
23305
23306
23307
23308 typedef struct quic_preferred_addr_st {
23309 uint16_t ipv4_port, ipv6_port;
23310 unsigned char ipv4[4], ipv6[16];
23311 QUIC_STATELESS_RESET_TOKEN stateless_reset;
23312 QUIC_CONN_ID cid;
23313 } QUIC_PREFERRED_ADDR;
23314
23315 int ossl_quic_wire_decode_transport_param_preferred_addr(PACKET *pkt,
23316 QUIC_PREFERRED_ADDR *p);
23317 # 16 "include/internal/quic_ackm.h" 2
23318
23319
23320
23321
23322
23323
23324 OSSL_ACKM *ossl_ackm_new(OSSL_TIME (*now)(void *arg),
23325 void *now_arg,
23326 OSSL_STATM *statm,
23327 const OSSL_CC_METHOD *cc_method,
23328 OSSL_CC_DATA *cc_data);
23329 void ossl_ackm_free(OSSL_ACKM *ackm);
23330
23331 void ossl_ackm_set_loss_detection_deadline_callback(OSSL_ACKM *ackm,
23332 void (*fn)(OSSL_TIME deadline,
23333 void *arg),
23334 void *arg);
23335
23336 void ossl_ackm_set_ack_deadline_callback(OSSL_ACKM *ackm,
23337 void (*fn)(OSSL_TIME deadline,
23338 int pkt_space,
23339 void *arg),
23340 void *arg);
23341
23342
23343
23344
23345
23346
23347
23348 void ossl_ackm_set_rx_max_ack_delay(OSSL_ACKM *ackm, OSSL_TIME rx_max_ack_delay);
23349 # 55 "include/internal/quic_ackm.h"
23350 void ossl_ackm_set_tx_max_ack_delay(OSSL_ACKM *ackm, OSSL_TIME tx_max_ack_delay);
23351
23352 typedef struct ossl_ackm_tx_pkt_st OSSL_ACKM_TX_PKT;
23353 struct ossl_ackm_tx_pkt_st {
23354
23355 QUIC_PN pkt_num;
23356
23357
23358 size_t num_bytes;
23359
23360
23361 OSSL_TIME time;
23362 # 78 "include/internal/quic_ackm.h"
23363 QUIC_PN largest_acked;
23364
23365
23366
23367
23368
23369 unsigned int pkt_space :2;
23370 # 93 "include/internal/quic_ackm.h"
23371 unsigned int is_inflight :1;
23372
23373
23374
23375
23376
23377 unsigned int is_ack_eliciting :1;
23378
23379
23380 unsigned int is_pto_probe :1;
23381
23382
23383 unsigned int is_mtu_probe :1;
23384
23385
23386 void (*on_lost)(void *arg);
23387
23388 void (*on_acked)(void *arg);
23389
23390
23391
23392
23393 void (*on_discarded)(void *arg);
23394 void *cb_arg;
23395 # 125 "include/internal/quic_ackm.h"
23396 struct { OSSL_ACKM_TX_PKT *next, *prev; } ossl_list_tx_history;
23397
23398 struct ossl_ackm_tx_pkt_st *anext;
23399 struct ossl_ackm_tx_pkt_st *lnext;
23400 };
23401
23402 int ossl_ackm_on_tx_packet(OSSL_ACKM *ackm, OSSL_ACKM_TX_PKT *pkt);
23403 int ossl_ackm_on_rx_datagram(OSSL_ACKM *ackm, size_t num_bytes);
23404
23405
23406
23407
23408
23409
23410 typedef struct ossl_ackm_rx_pkt_st {
23411
23412 QUIC_PN pkt_num;
23413
23414
23415 OSSL_TIME time;
23416
23417
23418
23419
23420
23421 unsigned int pkt_space :2;
23422
23423
23424 unsigned int is_ack_eliciting :1;
23425
23426
23427
23428
23429
23430 unsigned int ecn :2;
23431 } OSSL_ACKM_RX_PKT;
23432
23433 int ossl_ackm_on_rx_packet(OSSL_ACKM *ackm, const OSSL_ACKM_RX_PKT *pkt);
23434
23435 int ossl_ackm_on_rx_ack_frame(OSSL_ACKM *ackm, const OSSL_QUIC_FRAME_ACK *ack,
23436 int pkt_space, OSSL_TIME rx_time);
23437 # 174 "include/internal/quic_ackm.h"
23438 int ossl_ackm_on_pkt_space_discarded(OSSL_ACKM *ackm, int pkt_space);
23439
23440 int ossl_ackm_on_handshake_confirmed(OSSL_ACKM *ackm);
23441 int ossl_ackm_on_timeout(OSSL_ACKM *ackm);
23442
23443 OSSL_TIME ossl_ackm_get_loss_detection_deadline(OSSL_ACKM *ackm);
23444 # 188 "include/internal/quic_ackm.h"
23445 const OSSL_QUIC_FRAME_ACK *ossl_ackm_get_ack_frame(OSSL_ACKM *ackm,
23446 int pkt_space);
23447
23448
23449
23450
23451
23452
23453
23454 OSSL_TIME ossl_ackm_get_ack_deadline(OSSL_ACKM *ackm, int pkt_space);
23455 # 209 "include/internal/quic_ackm.h"
23456 int ossl_ackm_is_ack_desired(OSSL_ACKM *ackm, int pkt_space);
23457 # 230 "include/internal/quic_ackm.h"
23458 int ossl_ackm_is_rx_pn_processable(OSSL_ACKM *ackm, QUIC_PN pn, int pkt_space);
23459
23460 typedef struct ossl_ackm_probe_info_st {
23461 # 243 "include/internal/quic_ackm.h"
23462 uint32_t anti_deadlock_initial, anti_deadlock_handshake;
23463 # 252 "include/internal/quic_ackm.h"
23464 uint32_t pto[QUIC_PN_SPACE_NUM];
23465 } OSSL_ACKM_PROBE_INFO;
23466 # 269 "include/internal/quic_ackm.h"
23467 OSSL_ACKM_PROBE_INFO *ossl_ackm_get0_probe_request(OSSL_ACKM *ackm);
23468
23469 int ossl_ackm_get_largest_unacked(OSSL_ACKM *ackm, int pkt_space, QUIC_PN *pn);
23470 # 282 "include/internal/quic_ackm.h"
23471 int ossl_ackm_mark_packet_pseudo_lost(OSSL_ACKM *ackm,
23472 int pkt_space, QUIC_PN pn);
23473
23474
23475
23476
23477
23478 OSSL_TIME ossl_ackm_get_pto_duration(OSSL_ACKM *ackm);
23479
23480
23481 QUIC_PN ossl_ackm_get_largest_acked(OSSL_ACKM *ackm, int pkt_space);
23482 # 17 "include/internal/quic_ssl.h" 2
23483 # 1 "include/internal/quic_channel.h" 1
23484 # 15 "include/internal/quic_channel.h"
23485 # 1 "include/internal/quic_record_tx.h" 1
23486 # 18 "include/internal/quic_record_tx.h"
23487 # 1 "include/internal/qlog.h" 1
23488 # 17 "include/internal/qlog.h"
23489 typedef struct qlog_st QLOG;
23490
23491
23492
23493 enum {
23494 QLOG_EVENT_TYPE_NONE,
23495
23496
23497 # 1 "include/internal/qlog_events.h" 1
23498 # 9 "include/internal/qlog_events.h"
23499 QLOG_EVENT_TYPE_connectivity_connection_started,
23500 QLOG_EVENT_TYPE_connectivity_connection_state_updated,
23501 QLOG_EVENT_TYPE_connectivity_connection_closed,
23502 QLOG_EVENT_TYPE_transport_parameters_set,
23503 QLOG_EVENT_TYPE_transport_packet_sent,
23504 QLOG_EVENT_TYPE_transport_packet_received,
23505 QLOG_EVENT_TYPE_recovery_packet_lost,
23506 # 26 "include/internal/qlog.h" 2
23507
23508
23509 QLOG_EVENT_TYPE_NUM
23510 };
23511
23512 typedef struct qlog_trace_info_st {
23513 QUIC_CONN_ID odcid;
23514 const char *title, *description, *group_id;
23515 int is_server;
23516 OSSL_TIME (*now_cb)(void *arg);
23517 void *now_cb_arg;
23518 uint64_t override_process_id;
23519 const char *override_impl_name;
23520 } QLOG_TRACE_INFO;
23521
23522 QLOG *ossl_qlog_new(const QLOG_TRACE_INFO *info);
23523 QLOG *ossl_qlog_new_from_env(const QLOG_TRACE_INFO *info);
23524
23525 void ossl_qlog_free(QLOG *qlog);
23526
23527
23528 int ossl_qlog_set_event_type_enabled(QLOG *qlog, uint32_t event_type,
23529 int enable);
23530 int ossl_qlog_set_filter(QLOG *qlog, const char *filter);
23531
23532 int ossl_qlog_set_sink_bio(QLOG *qlog, BIO *bio);
23533
23534 int ossl_qlog_set_sink_file(QLOG *qlog, FILE *file, int close_flag);
23535
23536 int ossl_qlog_set_sink_filename(QLOG *qlog, const char *filename);
23537
23538
23539 int ossl_qlog_flush(QLOG *qlog);
23540
23541
23542 int ossl_qlog_enabled(QLOG *qlog, uint32_t event_type);
23543
23544
23545 int ossl_qlog_event_try_begin(QLOG *qlog, uint32_t event_type,
23546 const char *event_cat, const char *event_name,
23547 const char *event_combined_name);
23548 void ossl_qlog_event_end(QLOG *qlog);
23549
23550 void ossl_qlog_group_begin(QLOG *qlog, const char *name);
23551 void ossl_qlog_group_end(QLOG *qlog);
23552
23553 void ossl_qlog_array_begin(QLOG *qlog, const char *name);
23554 void ossl_qlog_array_end(QLOG *qlog);
23555
23556 void ossl_qlog_override_time(QLOG *qlog, OSSL_TIME event_time);
23557 # 108 "include/internal/qlog.h"
23558 void ossl_qlog_str(QLOG *qlog, const char *name, const char *value);
23559 void ossl_qlog_str_len(QLOG *qlog, const char *name,
23560 const char *value, size_t value_len);
23561 void ossl_qlog_u64(QLOG *qlog, const char *name, uint64_t value);
23562 void ossl_qlog_i64(QLOG *qlog, const char *name, int64_t value);
23563 void ossl_qlog_bool(QLOG *qlog, const char *name, int value);
23564 void ossl_qlog_bin(QLOG *qlog, const char *name,
23565 const void *value, size_t value_len);
23566 # 19 "include/internal/quic_record_tx.h" 2
23567
23568
23569
23570
23571
23572
23573
23574 typedef struct ossl_qtx_iovec_st {
23575 const unsigned char *buf;
23576 size_t buf_len;
23577 } OSSL_QTX_IOVEC;
23578
23579 typedef struct ossl_qtx_st OSSL_QTX;
23580
23581 typedef int (*ossl_mutate_packet_cb)(const QUIC_PKT_HDR *hdrin,
23582 const OSSL_QTX_IOVEC *iovecin, size_t numin,
23583 QUIC_PKT_HDR **hdrout,
23584 const OSSL_QTX_IOVEC **iovecout,
23585 size_t *numout,
23586 void *arg);
23587
23588 typedef void (*ossl_finish_mutate_cb)(void *arg);
23589
23590 typedef struct ossl_qtx_args_st {
23591 OSSL_LIB_CTX *libctx;
23592 const char *propq;
23593
23594
23595 BIO *bio;
23596
23597
23598 size_t mdpl;
23599
23600
23601 QLOG *(*get_qlog_cb)(void *arg);
23602 void *get_qlog_cb_arg;
23603 } OSSL_QTX_ARGS;
23604
23605
23606 OSSL_QTX *ossl_qtx_new(const OSSL_QTX_ARGS *args);
23607
23608
23609 void ossl_qtx_free(OSSL_QTX *qtx);
23610
23611
23612 void ossl_qtx_set_mutator(OSSL_QTX *qtx, ossl_mutate_packet_cb mutatecb,
23613 ossl_finish_mutate_cb finishmutatecb, void *mutatearg);
23614
23615
23616 void ossl_qtx_set_msg_callback(OSSL_QTX *qtx, ossl_msg_cb msg_callback,
23617 SSL *msg_callback_ssl);
23618 void ossl_qtx_set_msg_callback_arg(OSSL_QTX *qtx, void *msg_callback_arg);
23619
23620
23621 void ossl_qtx_set_qlog_cb(OSSL_QTX *qtx, QLOG *(*get_qlog_cb)(void *arg),
23622 void *get_qlog_cb_arg);
23623 # 114 "include/internal/quic_record_tx.h"
23624 int ossl_qtx_provide_secret(OSSL_QTX *qtx,
23625 uint32_t enc_level,
23626 uint32_t suite_id,
23627 EVP_MD *md,
23628 const unsigned char *secret,
23629 size_t secret_len);
23630 # 128 "include/internal/quic_record_tx.h"
23631 int ossl_qtx_discard_enc_level(OSSL_QTX *qtx, uint32_t enc_level);
23632
23633
23634 int ossl_qtx_is_enc_level_provisioned(OSSL_QTX *qtx, uint32_t enc_level);
23635
23636
23637
23638
23639
23640
23641
23642 int ossl_qtx_calculate_plaintext_payload_len(OSSL_QTX *qtx, uint32_t enc_level,
23643 size_t ciphertext_len,
23644 size_t *plaintext_len);
23645
23646
23647
23648
23649
23650
23651
23652 int ossl_qtx_calculate_ciphertext_payload_len(OSSL_QTX *qtx, uint32_t enc_level,
23653 size_t plaintext_len,
23654 size_t *ciphertext_len);
23655
23656 uint32_t ossl_qrl_get_suite_cipher_tag_len(uint32_t suite_id);
23657
23658
23659
23660
23661
23662
23663
23664 struct ossl_qtx_pkt_st {
23665
23666 QUIC_PKT_HDR *hdr;
23667
23668
23669
23670
23671
23672 const OSSL_QTX_IOVEC *iovec;
23673 size_t num_iovec;
23674
23675
23676 const BIO_ADDR *peer;
23677
23678
23679
23680
23681
23682 const BIO_ADDR *local;
23683
23684
23685
23686
23687
23688 QUIC_PN pn;
23689
23690
23691 uint32_t flags;
23692 };
23693 # 238 "include/internal/quic_record_tx.h"
23694 int ossl_qtx_write_pkt(OSSL_QTX *qtx, const OSSL_QTX_PKT *pkt);
23695
23696
23697
23698
23699
23700 void ossl_qtx_finish_dgram(OSSL_QTX *qtx);
23701 # 272 "include/internal/quic_record_tx.h"
23702 int ossl_qtx_flush_net(OSSL_QTX *qtx);
23703
23704
23705
23706
23707
23708
23709 int ossl_qtx_pop_net(OSSL_QTX *qtx, BIO_MSG *msg);
23710
23711
23712 size_t ossl_qtx_get_queue_len_datagrams(OSSL_QTX *qtx);
23713
23714
23715
23716
23717
23718 size_t ossl_qtx_get_queue_len_bytes(OSSL_QTX *qtx);
23719
23720
23721
23722
23723
23724
23725 size_t ossl_qtx_get_cur_dgram_len_bytes(OSSL_QTX *qtx);
23726
23727
23728
23729
23730
23731 size_t ossl_qtx_get_unflushed_pkt_count(OSSL_QTX *qtx);
23732
23733
23734
23735
23736
23737
23738 void ossl_qtx_set_bio(OSSL_QTX *qtx, BIO *bio);
23739
23740
23741 int ossl_qtx_set_mdpl(OSSL_QTX *qtx, size_t mdpl);
23742
23743
23744 size_t ossl_qtx_get_mdpl(OSSL_QTX *qtx);
23745 # 345 "include/internal/quic_record_tx.h"
23746 int ossl_qtx_trigger_key_update(OSSL_QTX *qtx);
23747 # 360 "include/internal/quic_record_tx.h"
23748 uint64_t ossl_qtx_get_cur_epoch_pkt_count(OSSL_QTX *qtx, uint32_t enc_level);
23749 # 383 "include/internal/quic_record_tx.h"
23750 uint64_t ossl_qtx_get_max_epoch_pkt_count(OSSL_QTX *qtx, uint32_t enc_level);
23751
23752
23753
23754
23755
23756 uint64_t ossl_qtx_get_key_epoch(OSSL_QTX *qtx);
23757 # 16 "include/internal/quic_channel.h" 2
23758
23759
23760
23761
23762 # 1 "include/internal/thread.h" 1
23763 # 13 "include/internal/thread.h"
23764 # 1 "include/internal/thread_arch.h" 1
23765 # 40 "include/internal/thread_arch.h"
23766 typedef struct crypto_mutex_st CRYPTO_MUTEX;
23767 typedef struct crypto_condvar_st CRYPTO_CONDVAR;
23768
23769 CRYPTO_MUTEX *ossl_crypto_mutex_new(void);
23770 void ossl_crypto_mutex_lock(CRYPTO_MUTEX *mutex);
23771 int ossl_crypto_mutex_try_lock(CRYPTO_MUTEX *mutex);
23772 void ossl_crypto_mutex_unlock(CRYPTO_MUTEX *mutex);
23773 void ossl_crypto_mutex_free(CRYPTO_MUTEX **mutex);
23774
23775 CRYPTO_CONDVAR *ossl_crypto_condvar_new(void);
23776 void ossl_crypto_condvar_wait(CRYPTO_CONDVAR *cv, CRYPTO_MUTEX *mutex);
23777 void ossl_crypto_condvar_wait_timeout(CRYPTO_CONDVAR *cv, CRYPTO_MUTEX *mutex,
23778 OSSL_TIME deadline);
23779 void ossl_crypto_condvar_broadcast(CRYPTO_CONDVAR *cv);
23780 void ossl_crypto_condvar_signal(CRYPTO_CONDVAR *cv);
23781 void ossl_crypto_condvar_free(CRYPTO_CONDVAR **cv);
23782
23783 typedef uint32_t CRYPTO_THREAD_RETVAL;
23784 typedef CRYPTO_THREAD_RETVAL (*CRYPTO_THREAD_ROUTINE)(void *);
23785 typedef CRYPTO_THREAD_RETVAL (*CRYPTO_THREAD_ROUTINE_CB)(void *,
23786 void (**)(void *),
23787 void **);
23788 # 71 "include/internal/thread_arch.h"
23789 typedef struct crypto_thread_st {
23790 uint32_t state;
23791 void *data;
23792 CRYPTO_THREAD_ROUTINE routine;
23793 CRYPTO_THREAD_RETVAL retval;
23794 void *handle;
23795 CRYPTO_MUTEX *lock;
23796 CRYPTO_MUTEX *statelock;
23797 CRYPTO_CONDVAR *condvar;
23798 unsigned long thread_id;
23799 int joinable;
23800 OSSL_LIB_CTX *ctx;
23801 } CRYPTO_THREAD;
23802 # 116 "include/internal/thread_arch.h"
23803 CRYPTO_THREAD * ossl_crypto_thread_native_start(CRYPTO_THREAD_ROUTINE routine,
23804 void *data, int joinable);
23805 int ossl_crypto_thread_native_spawn(CRYPTO_THREAD *thread);
23806 int ossl_crypto_thread_native_join(CRYPTO_THREAD *thread,
23807 CRYPTO_THREAD_RETVAL *retval);
23808 int ossl_crypto_thread_native_perform_join(CRYPTO_THREAD *thread,
23809 CRYPTO_THREAD_RETVAL *retval);
23810 int ossl_crypto_thread_native_exit(void);
23811 int ossl_crypto_thread_native_is_self(CRYPTO_THREAD *thread);
23812 int ossl_crypto_thread_native_clean(CRYPTO_THREAD *thread);
23813 # 14 "include/internal/thread.h" 2
23814
23815 # 1 "include/openssl/types.h" 1
23816 # 16 "include/internal/thread.h" 2
23817 # 1 "include/internal/cryptlib.h" 1
23818 # 12 "include/internal/cryptlib.h"
23819
23820 # 29 "include/internal/cryptlib.h"
23821 typedef struct ex_callback_st EX_CALLBACK;
23822 struct stack_st_EX_CALLBACK; typedef int (*sk_EX_CALLBACK_compfunc)(const EX_CALLBACK * const *a, const EX_CALLBACK *const *b); typedef void (*sk_EX_CALLBACK_freefunc)(EX_CALLBACK *a); typedef EX_CALLBACK * (*sk_EX_CALLBACK_copyfunc)(const EX_CALLBACK *a); static __attribute__((unused)) inline int sk_EX_CALLBACK_num(const struct stack_st_EX_CALLBACK *sk) { return OPENSSL_sk_num((const OPENSSL_STACK *)sk); } static __attribute__((unused)) inline EX_CALLBACK *sk_EX_CALLBACK_value(const struct stack_st_EX_CALLBACK *sk, int idx) { return (EX_CALLBACK *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); } static __attribute__((unused)) inline struct stack_st_EX_CALLBACK *sk_EX_CALLBACK_new(sk_EX_CALLBACK_compfunc compare) { return (struct stack_st_EX_CALLBACK *)OPENSSL_sk_new((OPENSSL_sk_compfunc)compare); } static __attribute__((unused)) inline struct stack_st_EX_CALLBACK *sk_EX_CALLBACK_new_null(void) { return (struct stack_st_EX_CALLBACK *)OPENSSL_sk_new_null(); } static __attribute__((unused)) inline struct stack_st_EX_CALLBACK *sk_EX_CALLBACK_new_reserve(sk_EX_CALLBACK_compfunc compare, int n) { return (struct stack_st_EX_CALLBACK *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); } static __attribute__((unused)) inline int sk_EX_CALLBACK_reserve(struct stack_st_EX_CALLBACK *sk, int n) { return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n); } static __attribute__((unused)) inline void sk_EX_CALLBACK_free(struct stack_st_EX_CALLBACK *sk) { OPENSSL_sk_free((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline void sk_EX_CALLBACK_zero(struct stack_st_EX_CALLBACK *sk) { OPENSSL_sk_zero((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline EX_CALLBACK *sk_EX_CALLBACK_delete(struct stack_st_EX_CALLBACK *sk, int i) { return (EX_CALLBACK *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); } static __attribute__((unused)) inline EX_CALLBACK *sk_EX_CALLBACK_delete_ptr(struct stack_st_EX_CALLBACK *sk, EX_CALLBACK *ptr) { return (EX_CALLBACK *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_EX_CALLBACK_push(struct stack_st_EX_CALLBACK *sk, EX_CALLBACK *ptr) { return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_EX_CALLBACK_unshift(struct stack_st_EX_CALLBACK *sk, EX_CALLBACK *ptr) { return OPENSSL_sk_unshift((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline EX_CALLBACK *sk_EX_CALLBACK_pop(struct stack_st_EX_CALLBACK *sk) { return (EX_CALLBACK *)OPENSSL_sk_pop((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline EX_CALLBACK *sk_EX_CALLBACK_shift(struct stack_st_EX_CALLBACK *sk) { return (EX_CALLBACK *)OPENSSL_sk_shift((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline void sk_EX_CALLBACK_pop_free(struct stack_st_EX_CALLBACK *sk, sk_EX_CALLBACK_freefunc freefunc) { OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); } static __attribute__((unused)) inline int sk_EX_CALLBACK_insert(struct stack_st_EX_CALLBACK *sk, EX_CALLBACK *ptr, int idx) { return OPENSSL_sk_insert((OPENSSL_STACK *)sk, (const void *)ptr, idx); } static __attribute__((unused)) inline EX_CALLBACK *sk_EX_CALLBACK_set(struct stack_st_EX_CALLBACK *sk, int idx, EX_CALLBACK *ptr) { return (EX_CALLBACK *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr); } static __attribute__((unused)) inline int sk_EX_CALLBACK_find(struct stack_st_EX_CALLBACK *sk, EX_CALLBACK *ptr) { return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_EX_CALLBACK_find_ex(struct stack_st_EX_CALLBACK *sk, EX_CALLBACK *ptr) { return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_EX_CALLBACK_find_all(struct stack_st_EX_CALLBACK *sk, EX_CALLBACK *ptr, int *pnum) { return OPENSSL_sk_find_all((OPENSSL_STACK *)sk, (const void *)ptr, pnum); } static __attribute__((unused)) inline void sk_EX_CALLBACK_sort(struct stack_st_EX_CALLBACK *sk) { OPENSSL_sk_sort((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline int sk_EX_CALLBACK_is_sorted(const struct stack_st_EX_CALLBACK *sk) { return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk); } static __attribute__((unused)) inline struct stack_st_EX_CALLBACK * sk_EX_CALLBACK_dup(const struct stack_st_EX_CALLBACK *sk) { return (struct stack_st_EX_CALLBACK *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk); } static __attribute__((unused)) inline struct stack_st_EX_CALLBACK *sk_EX_CALLBACK_deep_copy(const struct stack_st_EX_CALLBACK *sk, sk_EX_CALLBACK_copyfunc copyfunc, sk_EX_CALLBACK_freefunc freefunc) { return (struct stack_st_EX_CALLBACK *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk, (OPENSSL_sk_copyfunc)copyfunc, (OPENSSL_sk_freefunc)freefunc); } static __attribute__((unused)) inline sk_EX_CALLBACK_compfunc sk_EX_CALLBACK_set_cmp_func(struct stack_st_EX_CALLBACK *sk, sk_EX_CALLBACK_compfunc compare) { return (sk_EX_CALLBACK_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare); }
23823
23824 typedef struct mem_st MEM;
23825 struct lhash_st_MEM { union lh_MEM_dummy { void* d1; unsigned long d2; int d3; } dummy; }; static unsigned long lh_MEM_hfn_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) { unsigned long (*hfn_conv)(const MEM *) = (unsigned long (*)(const MEM *))hfn; return hfn_conv((const MEM *)data); } static int lh_MEM_cfn_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) { int (*cfn_conv)(const MEM *, const MEM *) = (int (*)(const MEM *, const MEM *))cfn; return cfn_conv((const MEM *)da, (const MEM *)db); } static __attribute__((unused)) inline void lh_MEM_free(struct lhash_st_MEM *lh) { OPENSSL_LH_free((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline void lh_MEM_flush(struct lhash_st_MEM *lh) { OPENSSL_LH_flush((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline MEM * lh_MEM_insert(struct lhash_st_MEM *lh, MEM *d) { return (MEM *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline MEM * lh_MEM_delete(struct lhash_st_MEM *lh, const MEM *d) { return (MEM *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline MEM * lh_MEM_retrieve(struct lhash_st_MEM *lh, const MEM *d) { return (MEM *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline int lh_MEM_error(struct lhash_st_MEM *lh) { return OPENSSL_LH_error((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline unsigned long lh_MEM_num_items(struct lhash_st_MEM *lh) { return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline unsigned long lh_MEM_get_down_load(struct lhash_st_MEM *lh) { return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline void lh_MEM_set_down_load(struct lhash_st_MEM *lh, unsigned long dl) { OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl); } static __attribute__((unused)) inline void lh_MEM_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) { void (*doall_conv)(MEM *) = (void (*)(MEM *))doall; doall_conv((MEM *)node); } static __attribute__((unused)) inline void lh_MEM_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) { void (*doall_conv)(MEM *, void *) = (void (*)(MEM *, void *))doall; doall_conv((MEM *)node, arg); } static __attribute__((unused)) inline void lh_MEM_doall(struct lhash_st_MEM *lh, void (*doall)(MEM *)) { OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); } static __attribute__((unused)) inline struct lhash_st_MEM * lh_MEM_new(unsigned long (*hfn)(const MEM *), int (*cfn)(const MEM *, const MEM *)) { return (struct lhash_st_MEM *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), lh_MEM_hfn_thunk, lh_MEM_cfn_thunk, lh_MEM_doall_thunk, lh_MEM_doall_arg_thunk); } static __attribute__((unused)) inline void lh_MEM_doall_arg(struct lhash_st_MEM *lh, void (*doallarg)(MEM *, void *), void *arg) { OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNCARG)doallarg, arg); } struct lhash_st_MEM;
23826
23827 void OPENSSL_cpuid_setup(void);
23828
23829
23830
23831 extern unsigned int OPENSSL_ia32cap_P[];
23832
23833 void OPENSSL_showfatal(const char *fmta, ...);
23834 int ossl_do_ex_data_init(OSSL_LIB_CTX *ctx);
23835 void ossl_crypto_cleanup_all_ex_data_int(OSSL_LIB_CTX *ctx);
23836 int openssl_init_fork_handlers(void);
23837 int openssl_get_fork_id(void);
23838
23839 char *ossl_safe_getenv(const char *name);
23840
23841 extern CRYPTO_RWLOCK *memdbg_lock;
23842 int openssl_strerror_r(int errnum, char *buf, size_t buflen);
23843
23844 FILE *openssl_fopen(const char *filename, const char *mode);
23845
23846
23847
23848
23849 uint32_t OPENSSL_rdtsc(void);
23850 size_t OPENSSL_instrument_bus(unsigned int *, size_t);
23851 size_t OPENSSL_instrument_bus2(unsigned int *, size_t, size_t);
23852
23853
23854
23855
23856
23857
23858
23859 struct ex_callback_st {
23860 long argl;
23861 void *argp;
23862 int priority;
23863 CRYPTO_EX_new *new_func;
23864 CRYPTO_EX_free *free_func;
23865 CRYPTO_EX_dup *dup_func;
23866 };
23867
23868
23869
23870
23871
23872 typedef struct ex_callbacks_st {
23873 struct stack_st_EX_CALLBACK *meth;
23874 } EX_CALLBACKS;
23875
23876 typedef struct ossl_ex_data_global_st {
23877 CRYPTO_RWLOCK *ex_data_lock;
23878 EX_CALLBACKS ex_data[18];
23879 } OSSL_EX_DATA_GLOBAL;
23880 # 122 "include/internal/cryptlib.h"
23881 OSSL_LIB_CTX *ossl_lib_ctx_get_concrete(OSSL_LIB_CTX *ctx);
23882 int ossl_lib_ctx_is_default(OSSL_LIB_CTX *ctx);
23883 int ossl_lib_ctx_is_global_default(OSSL_LIB_CTX *ctx);
23884
23885
23886 void *ossl_lib_ctx_get_data(OSSL_LIB_CTX *, int );
23887
23888 void ossl_lib_ctx_default_deinit(void);
23889 OSSL_EX_DATA_GLOBAL *ossl_lib_ctx_get_ex_data_global(OSSL_LIB_CTX *ctx);
23890
23891 const char *ossl_lib_ctx_get_descriptor(OSSL_LIB_CTX *libctx);
23892
23893 OSSL_LIB_CTX *ossl_crypto_ex_data_get_ossl_lib_ctx(const CRYPTO_EX_DATA *ad);
23894 int ossl_crypto_new_ex_data_ex(OSSL_LIB_CTX *ctx, int class_index, void *obj,
23895 CRYPTO_EX_DATA *ad);
23896 int ossl_crypto_get_ex_new_index_ex(OSSL_LIB_CTX *ctx, int class_index,
23897 long argl, void *argp,
23898 CRYPTO_EX_new *new_func,
23899 CRYPTO_EX_dup *dup_func,
23900 CRYPTO_EX_free *free_func,
23901 int priority);
23902 int ossl_crypto_free_ex_index_ex(OSSL_LIB_CTX *ctx, int class_index, int idx);
23903
23904
23905
23906
23907
23908
23909
23910 const void *ossl_bsearch(const void *key, const void *base, int num,
23911 int size, int (*cmp) (const void *, const void *),
23912 int flags);
23913
23914 char *ossl_sk_ASN1_UTF8STRING2text(struct stack_st_ASN1_UTF8STRING *text,
23915 const char *sep, size_t max_len);
23916 char *ossl_ipaddr_to_asc(unsigned char *p, int len);
23917
23918 char *ossl_buf2hexstr_sep(const unsigned char *buf, long buflen, char sep);
23919 unsigned char *ossl_hexstr2buf_sep(const char *str, long *buflen,
23920 const char sep);
23921 # 17 "include/internal/thread.h" 2
23922 # 1 "include/crypto/context.h" 1
23923 # 12 "include/crypto/context.h"
23924 void *ossl_provider_store_new(OSSL_LIB_CTX *);
23925 void *ossl_property_string_data_new(OSSL_LIB_CTX *);
23926 void *ossl_stored_namemap_new(OSSL_LIB_CTX *);
23927 void *ossl_property_defns_new(OSSL_LIB_CTX *);
23928 void *ossl_ctx_global_properties_new(OSSL_LIB_CTX *);
23929 void *ossl_rand_ctx_new(OSSL_LIB_CTX *);
23930 void *ossl_prov_conf_ctx_new(OSSL_LIB_CTX *);
23931 void *ossl_bio_core_globals_new(OSSL_LIB_CTX *);
23932 void *ossl_child_prov_ctx_new(OSSL_LIB_CTX *);
23933 void *ossl_prov_drbg_nonce_ctx_new(OSSL_LIB_CTX *);
23934 void *ossl_self_test_set_callback_new(OSSL_LIB_CTX *);
23935 void *ossl_rand_crng_ctx_new(OSSL_LIB_CTX *);
23936 int ossl_thread_register_fips(OSSL_LIB_CTX *);
23937 void *ossl_thread_event_ctx_new(OSSL_LIB_CTX *);
23938 void *ossl_fips_prov_ossl_ctx_new(OSSL_LIB_CTX *);
23939
23940 void *ossl_threads_ctx_new(OSSL_LIB_CTX *);
23941
23942
23943 void ossl_provider_store_free(void *);
23944 void ossl_property_string_data_free(void *);
23945 void ossl_stored_namemap_free(void *);
23946 void ossl_property_defns_free(void *);
23947 void ossl_ctx_global_properties_free(void *);
23948 void ossl_rand_ctx_free(void *);
23949 void ossl_prov_conf_ctx_free(void *);
23950 void ossl_bio_core_globals_free(void *);
23951 void ossl_child_prov_ctx_free(void *);
23952 void ossl_prov_drbg_nonce_ctx_free(void *);
23953 void ossl_self_test_set_callback_free(void *);
23954 void ossl_rand_crng_ctx_free(void *);
23955 void ossl_thread_event_ctx_free(void *);
23956 void ossl_fips_prov_ossl_ctx_free(void *);
23957 void ossl_release_default_drbg_ctx(void);
23958
23959 void ossl_threads_ctx_free(void *);
23960 # 18 "include/internal/thread.h" 2
23961
23962 void *ossl_crypto_thread_start(OSSL_LIB_CTX *ctx, CRYPTO_THREAD_ROUTINE start,
23963 void *data);
23964 int ossl_crypto_thread_join(void *task, CRYPTO_THREAD_RETVAL *retval);
23965 int ossl_crypto_thread_clean(void *vhandle);
23966 uint64_t ossl_get_avail_threads(OSSL_LIB_CTX *ctx);
23967
23968
23969
23970
23971
23972
23973 typedef struct openssl_threads_st {
23974 uint64_t max_threads;
23975 uint64_t active_threads;
23976 CRYPTO_MUTEX *lock;
23977 CRYPTO_CONDVAR *cond_finished;
23978 } OSSL_LIB_CTX_THREADS;
23979 # 21 "include/internal/quic_channel.h" 2
23980 # 109 "include/internal/quic_channel.h"
23981 typedef struct quic_channel_args_st {
23982
23983
23984
23985
23986 QUIC_PORT *port;
23987
23988 QUIC_LCIDM *lcidm;
23989
23990 QUIC_SRTM *srtm;
23991
23992 int is_server;
23993 SSL *tls;
23994
23995
23996 int use_qlog;
23997
23998
23999 const char *qlog_title;
24000 } QUIC_CHANNEL_ARGS;
24001
24002
24003 typedef struct quic_terminate_cause_st {
24004
24005
24006
24007
24008
24009 uint64_t error_code;
24010
24011
24012
24013
24014
24015 uint64_t frame_type;
24016 # 152 "include/internal/quic_channel.h"
24017 const char *reason;
24018
24019
24020
24021
24022
24023 size_t reason_len;
24024
24025
24026 unsigned int app : 1;
24027
24028
24029
24030
24031
24032
24033
24034 unsigned int remote : 1;
24035 } QUIC_TERMINATE_CAUSE;
24036
24037
24038
24039
24040
24041
24042
24043 QUIC_CHANNEL *ossl_quic_channel_new(const QUIC_CHANNEL_ARGS *args);
24044
24045
24046 void ossl_quic_channel_free(QUIC_CHANNEL *ch);
24047
24048
24049 int ossl_quic_channel_set_mutator(QUIC_CHANNEL *ch,
24050 ossl_mutate_packet_cb mutatecb,
24051 ossl_finish_mutate_cb finishmutatecb,
24052 void *mutatearg);
24053 # 205 "include/internal/quic_channel.h"
24054 int ossl_quic_channel_start(QUIC_CHANNEL *ch);
24055
24056
24057 void ossl_quic_channel_local_close(QUIC_CHANNEL *ch, uint64_t app_error_code,
24058 const char *app_reason);
24059
24060
24061
24062
24063 int ossl_quic_channel_on_handshake_confirmed(QUIC_CHANNEL *ch);
24064 # 230 "include/internal/quic_channel.h"
24065 void ossl_quic_channel_raise_protocol_error_loc(QUIC_CHANNEL *ch,
24066 uint64_t error_code,
24067 uint64_t frame_type,
24068 const char *reason,
24069 ERR_STATE *err_state,
24070 const char *src_file,
24071 int src_line,
24072 const char *src_func);
24073 # 262 "include/internal/quic_channel.h"
24074 int ossl_quic_channel_net_error(QUIC_CHANNEL *ch);
24075
24076
24077 void ossl_quic_channel_restore_err_state(QUIC_CHANNEL *ch);
24078
24079
24080 void ossl_quic_channel_on_remote_conn_close(QUIC_CHANNEL *ch,
24081 OSSL_QUIC_FRAME_CONN_CLOSE *f);
24082 void ossl_quic_channel_on_new_conn_id(QUIC_CHANNEL *ch,
24083 OSSL_QUIC_FRAME_NEW_CONN_ID *f);
24084
24085
24086 int ossl_quic_channel_on_new_conn(QUIC_CHANNEL *ch, const BIO_ADDR *peer,
24087 const QUIC_CONN_ID *peer_scid,
24088 const QUIC_CONN_ID *peer_dcid);
24089
24090
24091 void ossl_quic_channel_subtick(QUIC_CHANNEL *ch, QUIC_TICK_RESULT *r,
24092 uint32_t flags);
24093
24094
24095 void ossl_quic_channel_raise_net_error(QUIC_CHANNEL *ch);
24096
24097
24098 void ossl_quic_channel_on_stateless_reset(QUIC_CHANNEL *ch);
24099
24100 void ossl_quic_channel_inject(QUIC_CHANNEL *ch, QUIC_URXE *e);
24101
24102
24103
24104
24105
24106
24107
24108 QUIC_REACTOR *ossl_quic_channel_get_reactor(QUIC_CHANNEL *ch);
24109
24110
24111 QUIC_STREAM_MAP *ossl_quic_channel_get_qsm(QUIC_CHANNEL *ch);
24112
24113
24114 OSSL_STATM *ossl_quic_channel_get_statm(QUIC_CHANNEL *ch);
24115
24116
24117
24118
24119
24120 int ossl_quic_channel_get_peer_addr(QUIC_CHANNEL *ch, BIO_ADDR *peer_addr);
24121 int ossl_quic_channel_set_peer_addr(QUIC_CHANNEL *ch, const BIO_ADDR *peer_addr);
24122
24123
24124
24125
24126
24127 QUIC_STREAM *ossl_quic_channel_get_stream_by_id(QUIC_CHANNEL *ch,
24128 uint64_t stream_id);
24129
24130
24131 int ossl_quic_channel_is_term_any(const QUIC_CHANNEL *ch);
24132 const QUIC_TERMINATE_CAUSE *
24133 ossl_quic_channel_get_terminate_cause(const QUIC_CHANNEL *ch);
24134 int ossl_quic_channel_is_closing(const QUIC_CHANNEL *ch);
24135 int ossl_quic_channel_is_terminated(const QUIC_CHANNEL *ch);
24136 int ossl_quic_channel_is_active(const QUIC_CHANNEL *ch);
24137 int ossl_quic_channel_is_handshake_complete(const QUIC_CHANNEL *ch);
24138 int ossl_quic_channel_is_handshake_confirmed(const QUIC_CHANNEL *ch);
24139
24140 QUIC_PORT *ossl_quic_channel_get0_port(QUIC_CHANNEL *ch);
24141 QUIC_ENGINE *ossl_quic_channel_get0_engine(QUIC_CHANNEL *ch);
24142 QUIC_DEMUX *ossl_quic_channel_get0_demux(QUIC_CHANNEL *ch);
24143
24144 SSL *ossl_quic_channel_get0_ssl(QUIC_CHANNEL *ch);
24145 # 347 "include/internal/quic_channel.h"
24146 CRYPTO_MUTEX *ossl_quic_channel_get_mutex(QUIC_CHANNEL *ch);
24147
24148
24149
24150
24151
24152
24153 QUIC_STREAM *ossl_quic_channel_new_stream_local(QUIC_CHANNEL *ch, int is_uni);
24154
24155
24156
24157
24158
24159
24160
24161 QUIC_STREAM *ossl_quic_channel_new_stream_remote(QUIC_CHANNEL *ch,
24162 uint64_t stream_id);
24163
24164
24165
24166
24167
24168
24169
24170 void ossl_quic_channel_set_incoming_stream_auto_reject(QUIC_CHANNEL *ch,
24171 int enable,
24172 uint64_t aec);
24173
24174
24175
24176
24177
24178
24179 void ossl_quic_channel_reject_stream(QUIC_CHANNEL *ch, QUIC_STREAM *qs);
24180
24181
24182 int ossl_quic_channel_replace_local_cid(QUIC_CHANNEL *ch,
24183 const QUIC_CONN_ID *conn_id);
24184
24185
24186 void ossl_quic_channel_set_msg_callback(QUIC_CHANNEL *ch,
24187 ossl_msg_cb msg_callback,
24188 SSL *msg_callback_ssl);
24189 void ossl_quic_channel_set_msg_callback_arg(QUIC_CHANNEL *ch,
24190 void *msg_callback_arg);
24191
24192
24193 void ossl_quic_channel_set_txku_threshold_override(QUIC_CHANNEL *ch,
24194 uint64_t tx_pkt_threshold);
24195
24196
24197 uint64_t ossl_quic_channel_get_tx_key_epoch(QUIC_CHANNEL *ch);
24198 uint64_t ossl_quic_channel_get_rx_key_epoch(QUIC_CHANNEL *ch);
24199
24200
24201 int ossl_quic_channel_trigger_txku(QUIC_CHANNEL *ch);
24202 int ossl_quic_channel_has_pending(const QUIC_CHANNEL *ch);
24203
24204
24205 int ossl_quic_channel_ping(QUIC_CHANNEL *ch);
24206
24207
24208
24209
24210
24211 uint16_t ossl_quic_channel_get_diag_num_rx_ack(QUIC_CHANNEL *ch);
24212
24213
24214
24215
24216 void ossl_quic_channel_get_diag_local_cid(QUIC_CHANNEL *ch, QUIC_CONN_ID *cid);
24217
24218
24219
24220
24221
24222 int ossl_quic_channel_is_new_local_stream_admissible(QUIC_CHANNEL *ch, int is_uni);
24223
24224
24225
24226
24227
24228 uint64_t ossl_quic_channel_get_local_stream_count_avail(const QUIC_CHANNEL *ch,
24229 int is_uni);
24230 uint64_t ossl_quic_channel_get_remote_stream_count_avail(const QUIC_CHANNEL *ch,
24231 int is_uni);
24232
24233
24234
24235
24236 int ossl_quic_channel_have_generated_transport_params(const QUIC_CHANNEL *ch);
24237
24238
24239 void ossl_quic_channel_set_max_idle_timeout_request(QUIC_CHANNEL *ch, uint64_t ms);
24240
24241 uint64_t ossl_quic_channel_get_max_idle_timeout_request(const QUIC_CHANNEL *ch);
24242
24243 uint64_t ossl_quic_channel_get_max_idle_timeout_peer_request(const QUIC_CHANNEL *ch);
24244
24245 uint64_t ossl_quic_channel_get_max_idle_timeout_actual(const QUIC_CHANNEL *ch);
24246 # 18 "include/internal/quic_ssl.h" 2
24247
24248
24249
24250 SSL *ossl_quic_new(SSL_CTX *ctx);
24251 int ossl_quic_init(SSL *s);
24252 void ossl_quic_deinit(SSL *s);
24253 void ossl_quic_free(SSL *s);
24254 int ossl_quic_reset(SSL *s);
24255 int ossl_quic_clear(SSL *s);
24256 int ossl_quic_accept(SSL *s);
24257 int ossl_quic_connect(SSL *s);
24258 int ossl_quic_read(SSL *s, void *buf, size_t len, size_t *readbytes);
24259 int ossl_quic_peek(SSL *s, void *buf, size_t len, size_t *readbytes);
24260 int ossl_quic_write_flags(SSL *s, const void *buf, size_t len,
24261 uint64_t flags, size_t *written);
24262 int ossl_quic_write(SSL *s, const void *buf, size_t len, size_t *written);
24263 long ossl_quic_ctrl(SSL *s, int cmd, long larg, void *parg);
24264 long ossl_quic_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg);
24265 long ossl_quic_callback_ctrl(SSL *s, int cmd, void (*fp) (void));
24266 long ossl_quic_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp) (void));
24267 size_t ossl_quic_pending(const SSL *s);
24268 int ossl_quic_key_update(SSL *s, int update_type);
24269 int ossl_quic_get_key_update_type(const SSL *s);
24270 const SSL_CIPHER *ossl_quic_get_cipher_by_char(const unsigned char *p);
24271 int ossl_quic_num_ciphers(void);
24272 const SSL_CIPHER *ossl_quic_get_cipher(unsigned int u);
24273 int ossl_quic_renegotiate_check(SSL *ssl, int initok);
24274
24275 typedef struct quic_conn_st QUIC_CONNECTION;
24276 typedef struct quic_xso_st QUIC_XSO;
24277
24278 int ossl_quic_do_handshake(SSL *s);
24279 void ossl_quic_set_connect_state(SSL *s);
24280 void ossl_quic_set_accept_state(SSL *s);
24281
24282 int ossl_quic_has_pending(const SSL *s);
24283 int ossl_quic_handle_events(SSL *s);
24284 int ossl_quic_get_event_timeout(SSL *s, struct timeval *tv,
24285 int *is_infinite);
24286 OSSL_TIME ossl_quic_get_event_deadline(SSL *s);
24287 int ossl_quic_get_rpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *d);
24288 int ossl_quic_get_wpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *d);
24289 int ossl_quic_get_net_read_desired(SSL *s);
24290 int ossl_quic_get_net_write_desired(SSL *s);
24291 int ossl_quic_get_error(const SSL *s, int i);
24292 int ossl_quic_want(const SSL *s);
24293 int ossl_quic_conn_get_blocking_mode(const SSL *s);
24294 int ossl_quic_conn_set_blocking_mode(SSL *s, int blocking);
24295 int ossl_quic_conn_shutdown(SSL *s, uint64_t flags,
24296 const SSL_SHUTDOWN_EX_ARGS *args,
24297 size_t args_len);
24298 int ossl_quic_conn_stream_conclude(SSL *s);
24299 void ossl_quic_conn_set0_net_rbio(SSL *s, BIO *net_wbio);
24300 void ossl_quic_conn_set0_net_wbio(SSL *s, BIO *net_wbio);
24301 BIO *ossl_quic_conn_get_net_rbio(const SSL *s);
24302 BIO *ossl_quic_conn_get_net_wbio(const SSL *s);
24303 int ossl_quic_conn_set_initial_peer_addr(SSL *s,
24304 const BIO_ADDR *peer_addr);
24305 SSL *ossl_quic_conn_stream_new(SSL *s, uint64_t flags);
24306 SSL *ossl_quic_get0_connection(SSL *s);
24307 int ossl_quic_get_stream_type(SSL *s);
24308 uint64_t ossl_quic_get_stream_id(SSL *s);
24309 int ossl_quic_is_stream_local(SSL *s);
24310 int ossl_quic_set_default_stream_mode(SSL *s, uint32_t mode);
24311 SSL *ossl_quic_detach_stream(SSL *s);
24312 int ossl_quic_attach_stream(SSL *conn, SSL *stream);
24313 int ossl_quic_set_incoming_stream_policy(SSL *s, int policy,
24314 uint64_t aec);
24315 SSL *ossl_quic_accept_stream(SSL *s, uint64_t flags);
24316 size_t ossl_quic_get_accept_stream_queue_len(SSL *s);
24317 int ossl_quic_get_value_uint(SSL *s, uint32_t class_, uint32_t id,
24318 uint64_t *value);
24319 int ossl_quic_set_value_uint(SSL *s, uint32_t class_, uint32_t id,
24320 uint64_t value);
24321
24322 int ossl_quic_stream_reset(SSL *ssl,
24323 const SSL_STREAM_RESET_ARGS *args,
24324 size_t args_len);
24325
24326 int ossl_quic_get_stream_read_state(SSL *ssl);
24327 int ossl_quic_get_stream_write_state(SSL *ssl);
24328 int ossl_quic_get_stream_read_error_code(SSL *ssl,
24329 uint64_t *app_error_code);
24330 int ossl_quic_get_stream_write_error_code(SSL *ssl,
24331 uint64_t *app_error_code);
24332 int ossl_quic_get_conn_close_info(SSL *ssl,
24333 SSL_CONN_CLOSE_INFO *info,
24334 size_t info_len);
24335
24336 uint64_t ossl_quic_set_options(SSL *s, uint64_t opts);
24337 uint64_t ossl_quic_clear_options(SSL *s, uint64_t opts);
24338 uint64_t ossl_quic_get_options(const SSL *s);
24339
24340
24341 int ossl_quic_set_write_buffer_size(SSL *s, size_t size);
24342
24343
24344
24345
24346
24347
24348 int ossl_quic_conn_set_override_now_cb(SSL *s,
24349 OSSL_TIME (*now_cb)(void *arg),
24350 void *now_cb_arg);
24351
24352
24353
24354
24355
24356
24357 void ossl_quic_conn_force_assist_thread_wake(SSL *s);
24358
24359
24360 QUIC_CHANNEL *ossl_quic_conn_get_channel(SSL *s);
24361
24362 int ossl_quic_has_pending(const SSL *s);
24363 int ossl_quic_get_shutdown(const SSL *s);
24364 # 143 "include/internal/quic_ssl.h"
24365 int ossl_quic_set_diag_title(SSL_CTX *ctx, const char *title);
24366
24367
24368 int ossl_quic_conn_poll_events(SSL *ssl, uint64_t events, int do_tick,
24369 uint64_t *revents);
24370 # 15 "ssl/quic/quic_local.h" 2
24371 # 1 "include/internal/quic_txp.h" 1
24372 # 17 "include/internal/quic_txp.h"
24373 # 1 "include/internal/quic_cfq.h" 1
24374 # 26 "include/internal/quic_cfq.h"
24375 typedef struct quic_cfq_item_st QUIC_CFQ_ITEM;
24376
24377 struct quic_cfq_item_st {
24378
24379
24380
24381
24382
24383 QUIC_CFQ_ITEM *pkt_prev, *pkt_next;
24384
24385
24386 };
24387 # 46 "include/internal/quic_cfq.h"
24388 uint64_t ossl_quic_cfq_item_get_frame_type(const QUIC_CFQ_ITEM *item);
24389
24390
24391 const unsigned char *ossl_quic_cfq_item_get_encoded(const QUIC_CFQ_ITEM *item);
24392
24393
24394 size_t ossl_quic_cfq_item_get_encoded_len(const QUIC_CFQ_ITEM *item);
24395
24396
24397 int ossl_quic_cfq_item_get_state(const QUIC_CFQ_ITEM *item);
24398
24399
24400 uint32_t ossl_quic_cfq_item_get_pn_space(const QUIC_CFQ_ITEM *item);
24401
24402
24403 int ossl_quic_cfq_item_is_unreliable(const QUIC_CFQ_ITEM *item);
24404
24405
24406
24407
24408
24409
24410 QUIC_CFQ *ossl_quic_cfq_new(void);
24411 void ossl_quic_cfq_free(QUIC_CFQ *cfq);
24412 # 100 "include/internal/quic_cfq.h"
24413 typedef void (cfq_free_cb)(unsigned char *buf, size_t buf_len, void *arg);
24414
24415 QUIC_CFQ_ITEM *ossl_quic_cfq_add_frame(QUIC_CFQ *cfq,
24416 uint32_t priority,
24417 uint32_t pn_space,
24418 uint64_t frame_type,
24419 uint32_t flags,
24420 const unsigned char *encoded,
24421 size_t encoded_len,
24422 cfq_free_cb *free_cb,
24423 void *free_cb_arg);
24424
24425
24426
24427
24428 void ossl_quic_cfq_mark_tx(QUIC_CFQ *cfq, QUIC_CFQ_ITEM *item);
24429
24430
24431
24432
24433
24434
24435 void ossl_quic_cfq_mark_lost(QUIC_CFQ *cfq, QUIC_CFQ_ITEM *item,
24436 uint32_t priority);
24437
24438
24439
24440
24441
24442 void ossl_quic_cfq_release(QUIC_CFQ *cfq, QUIC_CFQ_ITEM *item);
24443 # 140 "include/internal/quic_cfq.h"
24444 QUIC_CFQ_ITEM *ossl_quic_cfq_get_priority_head(const QUIC_CFQ *cfq,
24445 uint32_t pn_space);
24446
24447
24448
24449
24450
24451
24452
24453 QUIC_CFQ_ITEM *ossl_quic_cfq_item_get_priority_next(const QUIC_CFQ_ITEM *item,
24454 uint32_t pn_space);
24455 # 18 "include/internal/quic_txp.h" 2
24456 # 1 "include/internal/quic_txpim.h" 1
24457 # 26 "include/internal/quic_txpim.h"
24458 typedef struct quic_txpim_pkt_st {
24459
24460 OSSL_ACKM_TX_PKT ackm_pkt;
24461
24462
24463 QUIC_CFQ_ITEM *retx_head;
24464
24465
24466 QUIC_FIFD *fifd;
24467
24468
24469 unsigned char pkt_type;
24470
24471
24472 unsigned int had_handshake_done_frame : 1;
24473 unsigned int had_max_data_frame : 1;
24474 unsigned int had_max_streams_bidi_frame : 1;
24475 unsigned int had_max_streams_uni_frame : 1;
24476 unsigned int had_ack_frame : 1;
24477 unsigned int had_conn_close : 1;
24478
24479
24480 } QUIC_TXPIM_PKT;
24481
24482
24483 typedef struct quic_txpim_chunk_st {
24484
24485 uint64_t stream_id;
24486
24487
24488
24489
24490
24491
24492 uint64_t start, end;
24493
24494
24495
24496
24497 unsigned int has_fin : 1;
24498
24499
24500
24501
24502 unsigned int has_stop_sending : 1;
24503
24504
24505
24506
24507 unsigned int has_reset_stream : 1;
24508 } QUIC_TXPIM_CHUNK;
24509
24510 QUIC_TXPIM *ossl_quic_txpim_new(void);
24511
24512
24513
24514
24515
24516
24517 void ossl_quic_txpim_free(QUIC_TXPIM *txpim);
24518
24519
24520
24521
24522
24523
24524 QUIC_TXPIM_PKT *ossl_quic_txpim_pkt_alloc(QUIC_TXPIM *txpim);
24525
24526
24527
24528
24529 void ossl_quic_txpim_pkt_release(QUIC_TXPIM *txpim, QUIC_TXPIM_PKT *fpkt);
24530
24531
24532 void ossl_quic_txpim_pkt_clear_chunks(QUIC_TXPIM_PKT *fpkt);
24533
24534
24535 int ossl_quic_txpim_pkt_append_chunk(QUIC_TXPIM_PKT *fpkt,
24536 const QUIC_TXPIM_CHUNK *chunk);
24537
24538
24539 void ossl_quic_txpim_pkt_add_cfq_item(QUIC_TXPIM_PKT *fpkt,
24540 QUIC_CFQ_ITEM *item);
24541 # 119 "include/internal/quic_txpim.h"
24542 const QUIC_TXPIM_CHUNK *ossl_quic_txpim_pkt_get_chunks(const QUIC_TXPIM_PKT *fpkt);
24543
24544
24545
24546
24547
24548 size_t ossl_quic_txpim_pkt_get_num_chunks(const QUIC_TXPIM_PKT *fpkt);
24549
24550
24551
24552
24553
24554 size_t ossl_quic_txpim_get_in_use(const QUIC_TXPIM *txpim);
24555 # 19 "include/internal/quic_txp.h" 2
24556 # 1 "include/internal/quic_stream.h" 1
24557 # 12 "include/internal/quic_stream.h"
24558
24559 # 21 "include/internal/quic_stream.h"
24560 # 1 "include/internal/quic_fc.h" 1
24561 # 24 "include/internal/quic_fc.h"
24562 typedef struct quic_txfc_st QUIC_TXFC;
24563
24564 struct quic_txfc_st {
24565 QUIC_TXFC *parent;
24566 uint64_t swm, cwm;
24567 char has_become_blocked;
24568 };
24569
24570
24571
24572
24573
24574
24575 int ossl_quic_txfc_init(QUIC_TXFC *txfc, QUIC_TXFC *conn_txfc);
24576
24577
24578
24579
24580
24581 QUIC_TXFC *ossl_quic_txfc_get_parent(QUIC_TXFC *txfc);
24582 # 55 "include/internal/quic_fc.h"
24583 int ossl_quic_txfc_bump_cwm(QUIC_TXFC *txfc, uint64_t cwm);
24584 # 67 "include/internal/quic_fc.h"
24585 uint64_t ossl_quic_txfc_get_credit(QUIC_TXFC *txfc, uint64_t consumed);
24586
24587
24588
24589
24590
24591
24592
24593 uint64_t ossl_quic_txfc_get_credit_local(QUIC_TXFC *txfc, uint64_t consumed);
24594 # 92 "include/internal/quic_fc.h"
24595 int ossl_quic_txfc_consume_credit(QUIC_TXFC *txfc, uint64_t num_bytes);
24596
24597
24598
24599
24600
24601
24602 int ossl_quic_txfc_consume_credit_local(QUIC_TXFC *txfc, uint64_t num_bytes);
24603 # 108 "include/internal/quic_fc.h"
24604 int ossl_quic_txfc_has_become_blocked(QUIC_TXFC *txfc, int clear);
24605
24606
24607
24608
24609
24610 uint64_t ossl_quic_txfc_get_cwm(QUIC_TXFC *txfc);
24611
24612
24613
24614
24615
24616 uint64_t ossl_quic_txfc_get_swm(QUIC_TXFC *txfc);
24617
24618
24619
24620
24621
24622 typedef struct quic_rxfc_st QUIC_RXFC;
24623
24624 struct quic_rxfc_st {
24625 # 137 "include/internal/quic_fc.h"
24626 uint64_t cwm, swm, rwm, esrwm, hwm, cur_window_size, max_window_size;
24627 OSSL_TIME epoch_start;
24628 OSSL_TIME (*now)(void *arg);
24629 void *now_arg;
24630 QUIC_RXFC *parent;
24631 unsigned char error_code, has_cwm_changed, is_fin, standalone;
24632 };
24633 # 153 "include/internal/quic_fc.h"
24634 int ossl_quic_rxfc_init(QUIC_RXFC *rxfc, QUIC_RXFC *conn_rxfc,
24635 uint64_t initial_window_size,
24636 uint64_t max_window_size,
24637 OSSL_TIME (*now)(void *arg),
24638 void *now_arg);
24639
24640
24641
24642
24643
24644
24645 int ossl_quic_rxfc_init_standalone(QUIC_RXFC *rxfc,
24646 uint64_t initial_window_size,
24647 OSSL_TIME (*now)(void *arg),
24648 void *now_arg);
24649
24650
24651
24652
24653
24654 QUIC_RXFC *ossl_quic_rxfc_get_parent(QUIC_RXFC *rxfc);
24655
24656
24657
24658
24659 void ossl_quic_rxfc_set_max_window_size(QUIC_RXFC *rxfc,
24660 size_t max_window_size);
24661 # 199 "include/internal/quic_fc.h"
24662 int ossl_quic_rxfc_on_rx_stream_frame(QUIC_RXFC *rxfc,
24663 uint64_t end, int is_fin);
24664 # 219 "include/internal/quic_fc.h"
24665 int ossl_quic_rxfc_on_retire(QUIC_RXFC *rxfc,
24666 uint64_t num_bytes,
24667 OSSL_TIME rtt);
24668 # 232 "include/internal/quic_fc.h"
24669 uint64_t ossl_quic_rxfc_get_cwm(const QUIC_RXFC *rxfc);
24670
24671
24672
24673
24674
24675
24676 uint64_t ossl_quic_rxfc_get_swm(const QUIC_RXFC *rxfc);
24677
24678
24679
24680
24681
24682 uint64_t ossl_quic_rxfc_get_rwm(const QUIC_RXFC *rxfc);
24683
24684
24685
24686
24687
24688 uint64_t ossl_quic_rxfc_get_credit(const QUIC_RXFC *rxfc);
24689
24690
24691
24692
24693
24694 int ossl_quic_rxfc_has_cwm_changed(QUIC_RXFC *rxfc, int clear);
24695 # 272 "include/internal/quic_fc.h"
24696 int ossl_quic_rxfc_get_error(QUIC_RXFC *rxfc, int clear);
24697
24698
24699
24700
24701
24702
24703 int ossl_quic_rxfc_get_final_size(const QUIC_RXFC *rxfc, uint64_t *final_size);
24704 # 22 "include/internal/quic_stream.h" 2
24705 # 60 "include/internal/quic_stream.h"
24706 QUIC_SSTREAM *ossl_quic_sstream_new(size_t init_buf_size);
24707
24708
24709
24710
24711
24712
24713
24714 void ossl_quic_sstream_free(QUIC_SSTREAM *qss);
24715 # 128 "include/internal/quic_stream.h"
24716 int ossl_quic_sstream_get_stream_frame(QUIC_SSTREAM *qss,
24717 size_t skip,
24718 OSSL_QUIC_FRAME_STREAM *hdr,
24719 OSSL_QTX_IOVEC *iov,
24720 size_t *num_iov);
24721
24722
24723
24724
24725
24726 int ossl_quic_sstream_has_pending(QUIC_SSTREAM *qss);
24727
24728
24729
24730
24731
24732 uint64_t ossl_quic_sstream_get_cur_size(QUIC_SSTREAM *qss);
24733 # 163 "include/internal/quic_stream.h"
24734 int ossl_quic_sstream_mark_transmitted(QUIC_SSTREAM *qss,
24735 uint64_t start,
24736 uint64_t end);
24737 # 176 "include/internal/quic_stream.h"
24738 int ossl_quic_sstream_mark_transmitted_fin(QUIC_SSTREAM *qss,
24739 uint64_t final_size);
24740 # 190 "include/internal/quic_stream.h"
24741 int ossl_quic_sstream_mark_lost(QUIC_SSTREAM *qss,
24742 uint64_t start,
24743 uint64_t end);
24744
24745
24746
24747
24748
24749
24750
24751 int ossl_quic_sstream_mark_lost_fin(QUIC_SSTREAM *qss);
24752 # 214 "include/internal/quic_stream.h"
24753 int ossl_quic_sstream_mark_acked(QUIC_SSTREAM *qss,
24754 uint64_t start,
24755 uint64_t end);
24756
24757
24758
24759
24760
24761
24762
24763 int ossl_quic_sstream_mark_acked_fin(QUIC_SSTREAM *qss);
24764 # 239 "include/internal/quic_stream.h"
24765 int ossl_quic_sstream_append(QUIC_SSTREAM *qss,
24766 const unsigned char *buf,
24767 size_t buf_len,
24768 size_t *consumed);
24769
24770
24771
24772
24773
24774 void ossl_quic_sstream_fin(QUIC_SSTREAM *qss);
24775
24776
24777
24778
24779
24780 int ossl_quic_sstream_get_final_size(QUIC_SSTREAM *qss, uint64_t *final_size);
24781
24782
24783
24784
24785
24786 int ossl_quic_sstream_is_totally_acked(QUIC_SSTREAM *qss);
24787 # 272 "include/internal/quic_stream.h"
24788 int ossl_quic_sstream_set_buffer_size(QUIC_SSTREAM *qss, size_t num_bytes);
24789
24790
24791
24792
24793 size_t ossl_quic_sstream_get_buffer_size(QUIC_SSTREAM *qss);
24794
24795
24796
24797
24798 size_t ossl_quic_sstream_get_buffer_used(QUIC_SSTREAM *qss);
24799
24800
24801
24802
24803 size_t ossl_quic_sstream_get_buffer_avail(QUIC_SSTREAM *qss);
24804
24805
24806
24807
24808
24809
24810 void ossl_quic_sstream_adjust_iov(size_t len,
24811 OSSL_QTX_IOVEC *iov,
24812 size_t num_iov);
24813
24814
24815
24816
24817 void ossl_quic_sstream_set_cleanse(QUIC_SSTREAM *qss, int cleanse);
24818 # 324 "include/internal/quic_stream.h"
24819 QUIC_RSTREAM *ossl_quic_rstream_new(QUIC_RXFC *rxfc,
24820 OSSL_STATM *statm, size_t rbuf_size);
24821
24822
24823
24824
24825 void ossl_quic_rstream_free(QUIC_RSTREAM *qrs);
24826 # 342 "include/internal/quic_stream.h"
24827 int ossl_quic_rstream_queue_data(QUIC_RSTREAM *qrs, OSSL_QRX_PKT *pkt,
24828 uint64_t offset,
24829 const unsigned char *data, uint64_t data_len,
24830 int fin);
24831
24832
24833
24834
24835
24836
24837
24838 int ossl_quic_rstream_read(QUIC_RSTREAM *qrs, unsigned char *buf, size_t size,
24839 size_t *readbytes, int *fin);
24840
24841
24842
24843
24844
24845
24846
24847 int ossl_quic_rstream_peek(QUIC_RSTREAM *qrs, unsigned char *buf, size_t size,
24848 size_t *readbytes, int *fin);
24849
24850
24851
24852
24853
24854
24855 int ossl_quic_rstream_available(QUIC_RSTREAM *qrs, size_t *avail, int *fin);
24856 # 384 "include/internal/quic_stream.h"
24857 int ossl_quic_rstream_get_record(QUIC_RSTREAM *qrs,
24858 const unsigned char **record, size_t *rec_len,
24859 int *fin);
24860 # 400 "include/internal/quic_stream.h"
24861 int ossl_quic_rstream_release_record(QUIC_RSTREAM *qrs, size_t read_len);
24862 # 410 "include/internal/quic_stream.h"
24863 int ossl_quic_rstream_move_to_rbuf(QUIC_RSTREAM *qrs);
24864 # 420 "include/internal/quic_stream.h"
24865 int ossl_quic_rstream_resize_rbuf(QUIC_RSTREAM *qrs, size_t rbuf_size);
24866
24867
24868
24869
24870 void ossl_quic_rstream_set_cleanse(QUIC_RSTREAM *qrs, int cleanse);
24871 # 20 "include/internal/quic_txp.h" 2
24872 # 1 "include/internal/quic_stream_map.h" 1
24873 # 12 "include/internal/quic_stream_map.h"
24874
24875 # 32 "include/internal/quic_stream_map.h"
24876 typedef struct quic_stream_list_node_st QUIC_STREAM_LIST_NODE;
24877
24878 struct quic_stream_list_node_st {
24879 QUIC_STREAM_LIST_NODE *prev, *next;
24880 };
24881 # 80 "include/internal/quic_stream_map.h"
24882 struct quic_stream_st {
24883 QUIC_STREAM_LIST_NODE active_node;
24884 QUIC_STREAM_LIST_NODE accept_node;
24885 QUIC_STREAM_LIST_NODE ready_for_gc_node;
24886
24887
24888 QUIC_STREAM *txp_next;
24889
24890
24891
24892
24893
24894
24895 uint64_t id;
24896
24897
24898
24899
24900
24901 uint64_t stop_sending_aec;
24902
24903
24904
24905
24906
24907 uint64_t reset_stream_aec;
24908
24909
24910
24911
24912
24913 uint64_t peer_stop_sending_aec;
24914
24915
24916
24917
24918
24919 uint64_t peer_reset_stream_aec;
24920
24921
24922 uint64_t txp_txfc_new_credit_consumed;
24923 # 133 "include/internal/quic_stream_map.h"
24924 uint64_t send_final_size;
24925 # 151 "include/internal/quic_stream_map.h"
24926 QUIC_SSTREAM *sstream;
24927 QUIC_RSTREAM *rstream;
24928
24929
24930 QUIC_TXFC txfc;
24931 QUIC_RXFC rxfc;
24932
24933 unsigned int type : 8;
24934
24935 unsigned int send_state : 8;
24936 unsigned int recv_state : 8;
24937
24938
24939 unsigned int active : 1;
24940 # 173 "include/internal/quic_stream_map.h"
24941 unsigned int as_server : 1;
24942
24943
24944
24945
24946
24947
24948 unsigned int stop_sending : 1;
24949
24950
24951
24952
24953
24954
24955 unsigned int peer_stop_sending : 1;
24956
24957
24958 unsigned int txp_sent_fc : 1;
24959 unsigned int txp_sent_stop_sending : 1;
24960 unsigned int txp_sent_reset_stream : 1;
24961 unsigned int txp_drained : 1;
24962 unsigned int txp_blocked : 1;
24963
24964
24965 unsigned int want_max_stream_data : 1;
24966 unsigned int want_stop_sending : 1;
24967 unsigned int want_reset_stream : 1;
24968
24969
24970 unsigned int acked_stop_sending : 1;
24971 # 312 "include/internal/quic_stream_map.h"
24972 unsigned int deleted : 1;
24973
24974 unsigned int ready_for_gc : 1;
24975
24976 unsigned int shutdown_flush : 1;
24977 };
24978 # 327 "include/internal/quic_stream_map.h"
24979 void ossl_quic_stream_check(const QUIC_STREAM *s);
24980
24981
24982
24983
24984
24985 static inline __attribute__((unused)) int ossl_quic_stream_is_server_init(const QUIC_STREAM *s)
24986 {
24987 return (s->type & 1) == 1;
24988 }
24989
24990
24991
24992
24993 static inline __attribute__((unused)) int ossl_quic_stream_is_bidi(const QUIC_STREAM *s)
24994 {
24995 return (s->type & 2) == 0;
24996 }
24997
24998
24999 static inline __attribute__((unused)) int ossl_quic_stream_is_local_init(const QUIC_STREAM *s)
25000 {
25001 return ossl_quic_stream_is_server_init(s) == s->as_server;
25002 }
25003 # 359 "include/internal/quic_stream_map.h"
25004 static inline __attribute__((unused)) int ossl_quic_stream_has_send(const QUIC_STREAM *s)
25005 {
25006 return s->send_state != 0;
25007 }
25008 # 372 "include/internal/quic_stream_map.h"
25009 static inline __attribute__((unused)) int ossl_quic_stream_has_recv(const QUIC_STREAM *s)
25010 {
25011 return s->recv_state != 0;
25012 }
25013 # 394 "include/internal/quic_stream_map.h"
25014 static inline __attribute__((unused)) int ossl_quic_stream_has_send_buffer(const QUIC_STREAM *s)
25015 {
25016 switch (s->send_state) {
25017 case 1:
25018 case 2:
25019 case 3:
25020 return 1;
25021 default:
25022 return 0;
25023 }
25024 }
25025
25026
25027
25028
25029
25030 static inline __attribute__((unused)) int ossl_quic_stream_send_is_reset(const QUIC_STREAM *s)
25031 {
25032 return s->send_state == 5
25033 || s->send_state == 6;
25034 }
25035 # 427 "include/internal/quic_stream_map.h"
25036 static inline __attribute__((unused)) int ossl_quic_stream_has_recv_buffer(const QUIC_STREAM *s)
25037 {
25038 switch (s->recv_state) {
25039 case 1:
25040 case 2:
25041 case 3:
25042 return 1;
25043 default:
25044 return 0;
25045 }
25046 }
25047
25048
25049
25050
25051
25052 static inline __attribute__((unused)) int ossl_quic_stream_recv_is_reset(const QUIC_STREAM *s)
25053 {
25054 return s->recv_state == 5
25055 || s->recv_state == 6;
25056 }
25057
25058
25059
25060
25061
25062
25063
25064 static inline __attribute__((unused)) int ossl_quic_stream_send_get_final_size(const QUIC_STREAM *s,
25065 uint64_t *final_size)
25066 {
25067 switch (s->send_state) {
25068 default:
25069 case 0:
25070 return 0;
25071 case 2:
25072
25073
25074
25075
25076
25077 return ossl_quic_sstream_get_final_size(s->sstream, final_size);
25078 case 3:
25079 case 4:
25080 case 5:
25081 case 6:
25082 if (final_size !=
25083 # 473 "include/internal/quic_stream_map.h" 3 4
25084 ((void *)0)
25085 # 473 "include/internal/quic_stream_map.h"
25086 )
25087 *final_size = s->send_final_size;
25088 return 1;
25089 }
25090 }
25091
25092
25093
25094
25095
25096
25097
25098 static inline __attribute__((unused)) int ossl_quic_stream_recv_get_final_size(const QUIC_STREAM *s,
25099 uint64_t *final_size)
25100 {
25101 switch (s->recv_state) {
25102 default:
25103 case 0:
25104 case 1:
25105 return 0;
25106
25107 case 2:
25108 case 3:
25109 case 4:
25110 case 5:
25111 case 6:
25112 if (!__builtin_expect(!!((ossl_quic_rxfc_get_final_size(&s->rxfc, final_size)) != 0), 1))
25113 return 0;
25114
25115 return 1;
25116 }
25117 }
25118 # 517 "include/internal/quic_stream_map.h"
25119 struct quic_stream_map_st {
25120 struct lhash_st_QUIC_STREAM *map;
25121 QUIC_STREAM_LIST_NODE active_list;
25122 QUIC_STREAM_LIST_NODE accept_list;
25123 QUIC_STREAM_LIST_NODE ready_for_gc_list;
25124 size_t rr_stepping, rr_counter;
25125 size_t num_accept_bidi, num_accept_uni, num_shutdown_flush;
25126 QUIC_STREAM *rr_cur;
25127 uint64_t (*get_stream_limit_cb)(int uni, void *arg);
25128 void *get_stream_limit_cb_arg;
25129 QUIC_RXFC *max_streams_bidi_rxfc;
25130 QUIC_RXFC *max_streams_uni_rxfc;
25131 int is_server;
25132 };
25133 # 545 "include/internal/quic_stream_map.h"
25134 int ossl_quic_stream_map_init(QUIC_STREAM_MAP *qsm,
25135 uint64_t (*get_stream_limit_cb)(int uni, void *arg),
25136 void *get_stream_limit_cb_arg,
25137 QUIC_RXFC *max_streams_bidi_rxfc,
25138 QUIC_RXFC *max_streams_uni_rxfc,
25139 int is_server);
25140
25141
25142
25143
25144
25145 void ossl_quic_stream_map_cleanup(QUIC_STREAM_MAP *qsm);
25146 # 567 "include/internal/quic_stream_map.h"
25147 QUIC_STREAM *ossl_quic_stream_map_alloc(QUIC_STREAM_MAP *qsm,
25148 uint64_t stream_id,
25149 int type);
25150
25151
25152
25153
25154
25155 void ossl_quic_stream_map_release(QUIC_STREAM_MAP *qsm, QUIC_STREAM *stream);
25156
25157
25158
25159
25160
25161 void ossl_quic_stream_map_visit(QUIC_STREAM_MAP *qsm,
25162 void (*visit_cb)(QUIC_STREAM *stream, void *arg),
25163 void *visit_cb_arg);
25164
25165
25166
25167
25168 QUIC_STREAM *ossl_quic_stream_map_get_by_id(QUIC_STREAM_MAP *qsm,
25169 uint64_t stream_id);
25170 # 602 "include/internal/quic_stream_map.h"
25171 void ossl_quic_stream_map_update_state(QUIC_STREAM_MAP *qsm, QUIC_STREAM *s);
25172
25173
25174
25175
25176
25177 void ossl_quic_stream_map_set_rr_stepping(QUIC_STREAM_MAP *qsm, size_t stepping);
25178 # 617 "include/internal/quic_stream_map.h"
25179 int ossl_quic_stream_map_is_local_allowed_by_stream_limit(QUIC_STREAM_MAP *qsm,
25180 uint64_t stream_ordinal,
25181 int is_uni);
25182 # 643 "include/internal/quic_stream_map.h"
25183 int ossl_quic_stream_map_ensure_send_part_id(QUIC_STREAM_MAP *qsm,
25184 QUIC_STREAM *qs);
25185 # 658 "include/internal/quic_stream_map.h"
25186 int ossl_quic_stream_map_notify_all_data_sent(QUIC_STREAM_MAP *qsm,
25187 QUIC_STREAM *qs);
25188 # 672 "include/internal/quic_stream_map.h"
25189 int ossl_quic_stream_map_notify_totally_acked(QUIC_STREAM_MAP *qsm,
25190 QUIC_STREAM *qs);
25191 # 686 "include/internal/quic_stream_map.h"
25192 int ossl_quic_stream_map_reset_stream_send_part(QUIC_STREAM_MAP *qsm,
25193 QUIC_STREAM *qs,
25194 uint64_t aec);
25195 # 703 "include/internal/quic_stream_map.h"
25196 int ossl_quic_stream_map_notify_reset_stream_acked(QUIC_STREAM_MAP *qsm,
25197 QUIC_STREAM *qs);
25198 # 719 "include/internal/quic_stream_map.h"
25199 int ossl_quic_stream_map_notify_size_known_recv_part(QUIC_STREAM_MAP *qsm,
25200 QUIC_STREAM *qs,
25201 uint64_t final_size);
25202
25203
25204
25205
25206
25207
25208
25209 int ossl_quic_stream_map_notify_totally_received(QUIC_STREAM_MAP *qsm,
25210 QUIC_STREAM *qs);
25211 # 739 "include/internal/quic_stream_map.h"
25212 int ossl_quic_stream_map_notify_totally_read(QUIC_STREAM_MAP *qsm,
25213 QUIC_STREAM *qs);
25214
25215
25216
25217
25218
25219
25220
25221 int ossl_quic_stream_map_notify_reset_recv_part(QUIC_STREAM_MAP *qsm,
25222 QUIC_STREAM *qs,
25223 uint64_t app_error_code,
25224 uint64_t final_size);
25225
25226
25227
25228
25229
25230
25231 int ossl_quic_stream_map_notify_app_read_reset_recv_part(QUIC_STREAM_MAP *qsm,
25232 QUIC_STREAM *qs);
25233 # 769 "include/internal/quic_stream_map.h"
25234 int ossl_quic_stream_map_stop_sending_recv_part(QUIC_STREAM_MAP *qsm,
25235 QUIC_STREAM *qs,
25236 uint64_t aec);
25237
25238
25239
25240
25241
25242
25243 int ossl_quic_stream_map_schedule_stop_sending(QUIC_STREAM_MAP *qsm,
25244 QUIC_STREAM *qs);
25245 # 790 "include/internal/quic_stream_map.h"
25246 void ossl_quic_stream_map_push_accept_queue(QUIC_STREAM_MAP *qsm,
25247 QUIC_STREAM *s);
25248
25249
25250
25251
25252
25253 QUIC_STREAM *ossl_quic_stream_map_peek_accept_queue(QUIC_STREAM_MAP *qsm);
25254
25255
25256
25257
25258
25259
25260
25261 void ossl_quic_stream_map_remove_from_accept_queue(QUIC_STREAM_MAP *qsm,
25262 QUIC_STREAM *s,
25263 OSSL_TIME rtt);
25264
25265
25266 size_t ossl_quic_stream_map_get_accept_queue_len(QUIC_STREAM_MAP *qsm, int is_uni);
25267
25268
25269 size_t ossl_quic_stream_map_get_total_accept_queue_len(QUIC_STREAM_MAP *qsm);
25270 # 824 "include/internal/quic_stream_map.h"
25271 void ossl_quic_stream_map_gc(QUIC_STREAM_MAP *qsm);
25272 # 833 "include/internal/quic_stream_map.h"
25273 void ossl_quic_stream_map_begin_shutdown_flush(QUIC_STREAM_MAP *qsm);
25274
25275
25276
25277
25278
25279 int ossl_quic_stream_map_is_shutdown_flush_finished(QUIC_STREAM_MAP *qsm);
25280 # 859 "include/internal/quic_stream_map.h"
25281 typedef struct quic_stream_iter_st {
25282 QUIC_STREAM_MAP *qsm;
25283 QUIC_STREAM *first_stream, *stream;
25284 } QUIC_STREAM_ITER;
25285
25286
25287
25288
25289
25290
25291 void ossl_quic_stream_iter_init(QUIC_STREAM_ITER *it, QUIC_STREAM_MAP *qsm,
25292 int advance_rr);
25293
25294
25295
25296
25297
25298
25299 void ossl_quic_stream_iter_next(QUIC_STREAM_ITER *it);
25300 # 21 "include/internal/quic_txp.h" 2
25301 # 32 "include/internal/quic_txp.h"
25302 typedef struct ossl_quic_tx_packetiser_args_st {
25303
25304 QUIC_CONN_ID cur_scid;
25305 QUIC_CONN_ID cur_dcid;
25306 BIO_ADDR peer;
25307 uint32_t ack_delay_exponent;
25308
25309
25310 OSSL_QTX *qtx;
25311 QUIC_TXPIM *txpim;
25312 QUIC_CFQ *cfq;
25313 OSSL_ACKM *ackm;
25314 QUIC_STREAM_MAP *qsm;
25315 QUIC_TXFC *conn_txfc;
25316 QUIC_RXFC *conn_rxfc;
25317 QUIC_RXFC *max_streams_bidi_rxfc;
25318 QUIC_RXFC *max_streams_uni_rxfc;
25319 const OSSL_CC_METHOD *cc_method;
25320 OSSL_CC_DATA *cc_data;
25321 OSSL_TIME (*now)(void *arg);
25322 void *now_arg;
25323 QLOG *(*get_qlog_cb)(void *arg);
25324 void *get_qlog_cb_arg;
25325
25326
25327
25328
25329
25330
25331
25332 QUIC_SSTREAM *crypto[QUIC_PN_SPACE_NUM];
25333
25334 } OSSL_QUIC_TX_PACKETISER_ARGS;
25335
25336 OSSL_QUIC_TX_PACKETISER *ossl_quic_tx_packetiser_new(const OSSL_QUIC_TX_PACKETISER_ARGS *args);
25337
25338 typedef void (ossl_quic_initial_token_free_fn)(const unsigned char *buf,
25339 size_t buf_len, void *arg);
25340
25341 void ossl_quic_tx_packetiser_free(OSSL_QUIC_TX_PACKETISER *txp);
25342
25343
25344
25345
25346
25347
25348 void ossl_quic_tx_packetiser_record_received_closing_bytes(
25349 OSSL_QUIC_TX_PACKETISER *txp, size_t n);
25350 # 93 "include/internal/quic_txp.h"
25351 typedef struct quic_txp_status_st {
25352 int sent_ack_eliciting;
25353 int sent_handshake;
25354 size_t sent_pkt;
25355 } QUIC_TXP_STATUS;
25356
25357 int ossl_quic_tx_packetiser_generate(OSSL_QUIC_TX_PACKETISER *txp,
25358 QUIC_TXP_STATUS *status);
25359 # 112 "include/internal/quic_txp.h"
25360 OSSL_TIME ossl_quic_tx_packetiser_get_deadline(OSSL_QUIC_TX_PACKETISER *txp);
25361 # 121 "include/internal/quic_txp.h"
25362 int ossl_quic_tx_packetiser_set_initial_token(OSSL_QUIC_TX_PACKETISER *txp,
25363 const unsigned char *token,
25364 size_t token_len,
25365 ossl_quic_initial_token_free_fn *free_cb,
25366 void *free_cb_arg);
25367
25368
25369 int ossl_quic_tx_packetiser_set_cur_dcid(OSSL_QUIC_TX_PACKETISER *txp,
25370 const QUIC_CONN_ID *dcid);
25371
25372
25373 int ossl_quic_tx_packetiser_set_cur_scid(OSSL_QUIC_TX_PACKETISER *txp,
25374 const QUIC_CONN_ID *scid);
25375
25376
25377
25378
25379
25380 int ossl_quic_tx_packetiser_set_peer(OSSL_QUIC_TX_PACKETISER *txp,
25381 const BIO_ADDR *peer);
25382
25383
25384
25385
25386 void ossl_quic_tx_packetiser_set_qlog_cb(OSSL_QUIC_TX_PACKETISER *txp,
25387 QLOG *(*get_qlog_cb)(void *arg),
25388 void *get_qlog_cb_arg);
25389 # 158 "include/internal/quic_txp.h"
25390 int ossl_quic_tx_packetiser_discard_enc_level(OSSL_QUIC_TX_PACKETISER *txp,
25391 uint32_t enc_level);
25392
25393
25394
25395
25396
25397
25398
25399 void ossl_quic_tx_packetiser_notify_handshake_complete(OSSL_QUIC_TX_PACKETISER *txp);
25400
25401
25402 void ossl_quic_tx_packetiser_schedule_handshake_done(OSSL_QUIC_TX_PACKETISER *txp);
25403
25404
25405 void ossl_quic_tx_packetiser_schedule_ack_eliciting(OSSL_QUIC_TX_PACKETISER *txp,
25406 uint32_t pn_space);
25407
25408
25409
25410
25411
25412 void ossl_quic_tx_packetiser_schedule_ack(OSSL_QUIC_TX_PACKETISER *txp,
25413 uint32_t pn_space);
25414 # 190 "include/internal/quic_txp.h"
25415 int ossl_quic_tx_packetiser_schedule_conn_close(OSSL_QUIC_TX_PACKETISER *txp,
25416 const OSSL_QUIC_FRAME_CONN_CLOSE *f);
25417
25418
25419 void ossl_quic_tx_packetiser_set_msg_callback(OSSL_QUIC_TX_PACKETISER *txp,
25420 ossl_msg_cb msg_callback,
25421 SSL *msg_callback_ssl);
25422 void ossl_quic_tx_packetiser_set_msg_callback_arg(OSSL_QUIC_TX_PACKETISER *txp,
25423 void *msg_callback_arg);
25424
25425
25426
25427
25428 QUIC_PN ossl_quic_tx_packetiser_get_next_pn(OSSL_QUIC_TX_PACKETISER *txp,
25429 uint32_t pn_space);
25430
25431
25432
25433
25434
25435 void ossl_quic_tx_packetiser_set_ack_tx_cb(OSSL_QUIC_TX_PACKETISER *txp,
25436 void (*cb)(const OSSL_QUIC_FRAME_ACK *ack,
25437 uint32_t pn_space,
25438 void *arg),
25439 void *cb_arg);
25440 # 16 "ssl/quic/quic_local.h" 2
25441
25442
25443
25444 # 1 "include/internal/quic_tls.h" 1
25445 # 19 "include/internal/quic_tls.h"
25446 typedef struct quic_tls_args_st {
25447
25448
25449
25450
25451 SSL *s;
25452
25453
25454
25455
25456
25457
25458
25459 int (*crypto_send_cb)(const unsigned char *buf, size_t buf_len,
25460 size_t *consumed, void *arg);
25461 void *crypto_send_cb_arg;
25462
25463
25464
25465
25466
25467
25468 int (*crypto_recv_rcd_cb)(const unsigned char **buf, size_t *bytes_read,
25469 void *arg);
25470 void *crypto_recv_rcd_cb_arg;
25471 int (*crypto_release_rcd_cb)(size_t bytes_read, void *arg);
25472 void *crypto_release_rcd_cb_arg;
25473
25474
25475
25476 int (*yield_secret_cb)(uint32_t enc_level, int direction ,
25477 uint32_t suite_id, EVP_MD *md,
25478 const unsigned char *secret, size_t secret_len,
25479 void *arg);
25480 void *yield_secret_cb_arg;
25481
25482
25483
25484
25485
25486
25487
25488 int (*got_transport_params_cb)(const unsigned char *params,
25489 size_t params_len,
25490 void *arg);
25491 void *got_transport_params_cb_arg;
25492
25493
25494
25495
25496
25497
25498 int (*handshake_complete_cb)(void *arg);
25499 void *handshake_complete_cb_arg;
25500
25501
25502
25503
25504
25505
25506
25507 int (*alert_cb)(void *arg, unsigned char alert_code);
25508 void *alert_cb_arg;
25509
25510
25511 int is_server;
25512 } QUIC_TLS_ARGS;
25513
25514 QUIC_TLS *ossl_quic_tls_new(const QUIC_TLS_ARGS *args);
25515
25516 void ossl_quic_tls_free(QUIC_TLS *qtls);
25517
25518
25519 int ossl_quic_tls_tick(QUIC_TLS *qtls);
25520
25521 int ossl_quic_tls_set_transport_params(QUIC_TLS *qtls,
25522 const unsigned char *transport_params,
25523 size_t transport_params_len);
25524
25525 int ossl_quic_tls_get_error(QUIC_TLS *qtls,
25526 uint64_t *error_code,
25527 const char **error_msg,
25528 ERR_STATE **error_state);
25529
25530 int ossl_quic_tls_is_cert_request(QUIC_TLS *qtls);
25531 int ossl_quic_tls_has_bad_max_early_data(QUIC_TLS *qtls);
25532 # 20 "ssl/quic/quic_local.h" 2
25533
25534
25535
25536 # 1 "include/internal/quic_reactor.h" 1
25537 # 72 "include/internal/quic_reactor.h"
25538 struct quic_tick_result_st {
25539 char net_read_desired;
25540 char net_write_desired;
25541 OSSL_TIME tick_deadline;
25542 };
25543
25544 static inline __attribute__((unused)) void
25545 ossl_quic_tick_result_merge_into(QUIC_TICK_RESULT *r,
25546 const QUIC_TICK_RESULT *src)
25547 {
25548 r->net_read_desired = r->net_read_desired || src->net_read_desired;
25549 r->net_write_desired = r->net_write_desired || src->net_write_desired;
25550 r->tick_deadline = ossl_time_min(r->tick_deadline, src->tick_deadline);
25551 }
25552
25553 struct quic_reactor_st {
25554 # 96 "include/internal/quic_reactor.h"
25555 BIO_POLL_DESCRIPTOR poll_r, poll_w;
25556 OSSL_TIME tick_deadline;
25557
25558 void (*tick_cb)(QUIC_TICK_RESULT *res, void *arg, uint32_t flags);
25559 void *tick_cb_arg;
25560
25561
25562
25563
25564
25565 unsigned int net_read_desired : 1;
25566 unsigned int net_write_desired : 1;
25567
25568
25569
25570
25571
25572 unsigned int can_poll_r : 1;
25573 unsigned int can_poll_w : 1;
25574 };
25575
25576 void ossl_quic_reactor_init(QUIC_REACTOR *rtor,
25577 void (*tick_cb)(QUIC_TICK_RESULT *res, void *arg,
25578 uint32_t flags),
25579 void *tick_cb_arg,
25580 OSSL_TIME initial_tick_deadline);
25581
25582 void ossl_quic_reactor_set_poll_r(QUIC_REACTOR *rtor,
25583 const BIO_POLL_DESCRIPTOR *r);
25584
25585 void ossl_quic_reactor_set_poll_w(QUIC_REACTOR *rtor,
25586 const BIO_POLL_DESCRIPTOR *w);
25587
25588 const BIO_POLL_DESCRIPTOR *ossl_quic_reactor_get_poll_r(const QUIC_REACTOR *rtor);
25589 const BIO_POLL_DESCRIPTOR *ossl_quic_reactor_get_poll_w(const QUIC_REACTOR *rtor);
25590
25591 int ossl_quic_reactor_can_poll_r(const QUIC_REACTOR *rtor);
25592 int ossl_quic_reactor_can_poll_w(const QUIC_REACTOR *rtor);
25593
25594 int ossl_quic_reactor_can_support_poll_descriptor(const QUIC_REACTOR *rtor,
25595 const BIO_POLL_DESCRIPTOR *d);
25596
25597 int ossl_quic_reactor_net_read_desired(QUIC_REACTOR *rtor);
25598 int ossl_quic_reactor_net_write_desired(QUIC_REACTOR *rtor);
25599
25600 OSSL_TIME ossl_quic_reactor_get_tick_deadline(QUIC_REACTOR *rtor);
25601 # 153 "include/internal/quic_reactor.h"
25602 int ossl_quic_reactor_tick(QUIC_REACTOR *rtor, uint32_t flags);
25603 # 192 "include/internal/quic_reactor.h"
25604 int ossl_quic_reactor_block_until_pred(QUIC_REACTOR *rtor,
25605 int (*pred)(void *arg), void *pred_arg,
25606 uint32_t flags,
25607 CRYPTO_MUTEX *mutex);
25608 # 24 "ssl/quic/quic_local.h" 2
25609 # 1 "include/internal/quic_thread_assist.h" 1
25610 # 45 "include/internal/quic_thread_assist.h"
25611 typedef struct quic_thread_assist_st {
25612 QUIC_CHANNEL *ch;
25613 CRYPTO_CONDVAR *cv;
25614 CRYPTO_THREAD *t;
25615 int teardown, joined;
25616 OSSL_TIME (*now_cb)(void *arg);
25617 void *now_cb_arg;
25618 } QUIC_THREAD_ASSIST;
25619
25620
25621
25622
25623
25624
25625
25626 int ossl_quic_thread_assist_init_start(QUIC_THREAD_ASSIST *qta,
25627 QUIC_CHANNEL *ch,
25628 OSSL_TIME (*now_cb)(void *arg),
25629 void *now_cb_arg);
25630 # 72 "include/internal/quic_thread_assist.h"
25631 int ossl_quic_thread_assist_stop_async(QUIC_THREAD_ASSIST *qta);
25632 # 81 "include/internal/quic_thread_assist.h"
25633 int ossl_quic_thread_assist_wait_stopped(QUIC_THREAD_ASSIST *qta);
25634 # 91 "include/internal/quic_thread_assist.h"
25635 int ossl_quic_thread_assist_cleanup(QUIC_THREAD_ASSIST *qta);
25636
25637
25638
25639
25640
25641
25642 int ossl_quic_thread_assist_notify_deadline_changed(QUIC_THREAD_ASSIST *qta);
25643 # 25 "ssl/quic/quic_local.h" 2
25644 # 1 "ssl/quic/../ssl_local.h" 1
25645 # 26 "ssl/quic/quic_local.h" 2
25646 # 34 "ssl/quic/quic_local.h"
25647 struct quic_xso_st {
25648
25649 struct ssl_st ssl;
25650
25651
25652 QUIC_CONNECTION *conn;
25653
25654
25655 QUIC_STREAM *stream;
25656
25657
25658
25659
25660
25661
25662 unsigned int desires_blocking : 1;
25663
25664
25665
25666
25667
25668 unsigned int desires_blocking_set : 1;
25669
25670
25671 unsigned int retired_fin : 1;
25672
25673
25674
25675
25676
25677 unsigned int requested_reset : 1;
25678 # 85 "ssl/quic/quic_local.h"
25679 unsigned int aon_write_in_progress : 1;
25680
25681
25682 unsigned int event_handling_mode : 2;
25683 # 99 "ssl/quic/quic_local.h"
25684 const unsigned char *aon_buf_base;
25685
25686 size_t aon_buf_len;
25687
25688
25689
25690
25691 size_t aon_buf_pos;
25692
25693
25694 uint32_t ssl_mode;
25695
25696
25697 uint64_t ssl_options;
25698
25699
25700
25701
25702
25703
25704 int last_error;
25705 };
25706
25707 struct quic_conn_st {
25708
25709
25710
25711
25712
25713
25714
25715 struct ssl_st ssl;
25716
25717 SSL *tls;
25718
25719
25720 QUIC_ENGINE *engine;
25721
25722
25723 QUIC_PORT *port;
25724 # 151 "ssl/quic/quic_local.h"
25725 QUIC_CHANNEL *ch;
25726
25727
25728
25729
25730
25731 CRYPTO_MUTEX *mutex;
25732
25733
25734
25735
25736
25737 QUIC_XSO *default_xso;
25738
25739
25740 BIO *net_rbio, *net_wbio;
25741
25742
25743 BIO_ADDR init_peer_addr;
25744
25745
25746
25747 QUIC_THREAD_ASSIST thread_assist;
25748
25749
25750
25751 OSSL_TIME (*override_now_cb)(void *arg);
25752 void *override_now_cb_arg;
25753
25754
25755 size_t num_xso;
25756
25757
25758 unsigned int started : 1;
25759
25760
25761
25762
25763
25764 unsigned int as_server : 1;
25765
25766
25767
25768
25769
25770 unsigned int as_server_state : 1;
25771
25772
25773 unsigned int is_thread_assisted : 1;
25774
25775
25776 unsigned int blocking : 1;
25777
25778
25779 unsigned int desires_blocking : 1;
25780
25781
25782 unsigned int default_xso_created : 1;
25783
25784
25785
25786
25787
25788
25789 unsigned int shutting_down : 1;
25790
25791
25792 unsigned int addressing_probe_done : 1;
25793
25794
25795 unsigned int addressed_mode_w : 1;
25796 unsigned int addressed_mode_r : 1;
25797
25798
25799 unsigned int event_handling_mode : 2;
25800
25801
25802 uint32_t default_stream_mode;
25803
25804
25805 uint32_t default_ssl_mode;
25806
25807
25808 uint64_t default_ssl_options;
25809
25810
25811 int incoming_stream_policy;
25812 uint64_t incoming_stream_aec;
25813
25814
25815
25816
25817
25818
25819 int last_error;
25820 };
25821
25822
25823 int ossl_quic_conn_on_handshake_confirmed(QUIC_CONNECTION *qc);
25824
25825
25826
25827
25828
25829
25830
25831 void ossl_quic_conn_raise_protocol_error(QUIC_CONNECTION *qc,
25832 uint64_t error_code,
25833 uint64_t frame_type,
25834 const char *reason);
25835
25836 void ossl_quic_conn_on_remote_conn_close(QUIC_CONNECTION *qc,
25837 OSSL_QUIC_FRAME_CONN_CLOSE *f);
25838
25839 int ossl_quic_trace(int write_p, int version, int content_type,
25840 const void *buf, size_t msglen, SSL *ssl, void *arg);
25841 # 1827 "ssl/ssl_local.h" 2
25842 # 1849 "ssl/ssl_local.h"
25843 typedef struct sigalg_lookup_st {
25844
25845 const char *name;
25846
25847 uint16_t sigalg;
25848
25849 int hash;
25850
25851 int hash_idx;
25852
25853 int sig;
25854
25855 int sig_idx;
25856
25857 int sigandhash;
25858
25859 int curve;
25860
25861 int enabled;
25862 } SIGALG_LOOKUP;
25863 # 1885 "ssl/ssl_local.h"
25864 struct dtls1_retransmit_state {
25865 const OSSL_RECORD_METHOD *wrlmethod;
25866 OSSL_RECORD_LAYER *wrl;
25867 };
25868
25869 struct hm_header_st {
25870 unsigned char type;
25871 size_t msg_len;
25872 unsigned short seq;
25873 size_t frag_off;
25874 size_t frag_len;
25875 unsigned int is_ccs;
25876 struct dtls1_retransmit_state saved_retransmit_state;
25877 };
25878
25879 typedef struct hm_fragment_st {
25880 struct hm_header_st msg_header;
25881 unsigned char *fragment;
25882 unsigned char *reassembly;
25883 } hm_fragment;
25884
25885 typedef struct pqueue_st pqueue;
25886 typedef struct pitem_st pitem;
25887
25888 struct pitem_st {
25889 unsigned char priority[8];
25890 void *data;
25891 pitem *next;
25892 };
25893
25894 typedef struct pitem_st *piterator;
25895
25896 pitem *pitem_new(unsigned char *prio64be, void *data);
25897 void pitem_free(pitem *item);
25898 pqueue *pqueue_new(void);
25899 void pqueue_free(pqueue *pq);
25900 pitem *pqueue_insert(pqueue *pq, pitem *item);
25901 pitem *pqueue_peek(pqueue *pq);
25902 pitem *pqueue_pop(pqueue *pq);
25903 pitem *pqueue_find(pqueue *pq, unsigned char *prio64be);
25904 pitem *pqueue_iterator(pqueue *pq);
25905 pitem *pqueue_next(piterator *iter);
25906 size_t pqueue_size(pqueue *pq);
25907
25908 typedef struct dtls1_state_st {
25909 unsigned char cookie[255];
25910 size_t cookie_len;
25911 unsigned int cookie_verified;
25912
25913 unsigned short handshake_write_seq;
25914 unsigned short next_handshake_write_seq;
25915 unsigned short handshake_read_seq;
25916
25917 pqueue *buffered_messages;
25918
25919 pqueue *sent_messages;
25920 size_t link_mtu;
25921 size_t mtu;
25922 struct hm_header_st w_msg_hdr;
25923 struct hm_header_st r_msg_hdr;
25924
25925 unsigned int timeout_num_alerts;
25926
25927
25928
25929 OSSL_TIME next_timeout;
25930
25931 unsigned int timeout_duration_us;
25932
25933 unsigned int retransmitting;
25934
25935
25936
25937
25938 DTLS_timer_cb timer_cb;
25939
25940 } DTLS1_STATE;
25941 # 1984 "ssl/ssl_local.h"
25942 struct cert_pkey_st {
25943 X509 *x509;
25944 EVP_PKEY *privatekey;
25945
25946 struct stack_st_X509 *chain;
25947
25948
25949
25950
25951
25952
25953
25954 unsigned char *serverinfo;
25955 size_t serverinfo_length;
25956
25957
25958
25959
25960
25961 };
25962
25963
25964
25965
25966
25967
25968 typedef enum {
25969 ENDPOINT_CLIENT = 0,
25970 ENDPOINT_SERVER,
25971 ENDPOINT_BOTH
25972 } ENDPOINT;
25973
25974
25975 typedef struct {
25976 unsigned short ext_type;
25977 ENDPOINT role;
25978
25979 unsigned int context;
25980
25981
25982
25983
25984 uint32_t ext_flags;
25985 SSL_custom_ext_add_cb_ex add_cb;
25986 SSL_custom_ext_free_cb_ex free_cb;
25987 void *add_arg;
25988 SSL_custom_ext_parse_cb_ex parse_cb;
25989 void *parse_arg;
25990 } custom_ext_method;
25991 # 2047 "ssl/ssl_local.h"
25992 typedef struct {
25993 custom_ext_method *meths;
25994 size_t meths_count;
25995 } custom_ext_methods;
25996
25997 typedef struct cert_st {
25998
25999
26000
26001
26002
26003
26004 CERT_PKEY *key;
26005
26006 EVP_PKEY *dh_tmp;
26007 DH *(*dh_tmp_cb) (SSL *ssl, int is_export, int keysize);
26008 int dh_tmp_auto;
26009
26010 uint32_t cert_flags;
26011 CERT_PKEY *pkeys;
26012 size_t ssl_pkey_num;
26013
26014 uint8_t *ctype;
26015 size_t ctype_len;
26016
26017
26018
26019
26020
26021 uint16_t *conf_sigalgs;
26022
26023 size_t conf_sigalgslen;
26024
26025
26026
26027
26028
26029
26030
26031 uint16_t *client_sigalgs;
26032
26033 size_t client_sigalgslen;
26034
26035
26036
26037
26038
26039
26040
26041 int (*cert_cb) (SSL *ssl, void *arg);
26042 void *cert_cb_arg;
26043
26044
26045
26046
26047 X509_STORE *chain_store;
26048 X509_STORE *verify_store;
26049
26050 custom_ext_methods custext;
26051
26052 int (*sec_cb) (const SSL *s, const SSL_CTX *ctx, int op, int bits, int nid,
26053 void *other, void *ex);
26054
26055 int sec_level;
26056 void *sec_ex;
26057
26058
26059 char *psk_identity_hint;
26060
26061 CRYPTO_REF_COUNT references;
26062 } CERT;
26063
26064
26065
26066
26067
26068
26069
26070 typedef struct ssl3_enc_method {
26071 int (*setup_key_block) (SSL_CONNECTION *);
26072 int (*generate_master_secret) (SSL_CONNECTION *, unsigned char *,
26073 unsigned char *, size_t, size_t *);
26074 int (*change_cipher_state) (SSL_CONNECTION *, int);
26075 size_t (*final_finish_mac) (SSL_CONNECTION *, const char *, size_t,
26076 unsigned char *);
26077 const char *client_finished_label;
26078 size_t client_finished_label_len;
26079 const char *server_finished_label;
26080 size_t server_finished_label_len;
26081 int (*alert_value) (int);
26082 int (*export_keying_material) (SSL_CONNECTION *, unsigned char *, size_t,
26083 const char *, size_t,
26084 const unsigned char *, size_t,
26085 int use_context);
26086
26087 uint32_t enc_flags;
26088
26089 int (*set_handshake_header) (SSL_CONNECTION *s, WPACKET *pkt, int type);
26090
26091 int (*close_construct_packet) (SSL_CONNECTION *s, WPACKET *pkt, int htype);
26092
26093 int (*do_write) (SSL_CONNECTION *s);
26094 } SSL3_ENC_METHOD;
26095 # 2173 "ssl/ssl_local.h"
26096 typedef enum downgrade_en {
26097 DOWNGRADE_NONE,
26098 DOWNGRADE_TO_1_2,
26099 DOWNGRADE_TO_1_1
26100 } DOWNGRADE;
26101 # 2237 "ssl/ssl_local.h"
26102 extern const unsigned char tls11downgrade[8];
26103 extern const unsigned char tls12downgrade[8];
26104
26105 extern const SSL3_ENC_METHOD ssl3_undef_enc_method;
26106
26107 const SSL_METHOD *sslv3_method(void);
26108 const SSL_METHOD *sslv3_server_method(void);
26109 const SSL_METHOD *sslv3_client_method(void);
26110 const SSL_METHOD *tlsv1_method(void);
26111 const SSL_METHOD *tlsv1_server_method(void);
26112 const SSL_METHOD *tlsv1_client_method(void);
26113 const SSL_METHOD *tlsv1_1_method(void);
26114 const SSL_METHOD *tlsv1_1_server_method(void);
26115 const SSL_METHOD *tlsv1_1_client_method(void);
26116 const SSL_METHOD *tlsv1_2_method(void);
26117 const SSL_METHOD *tlsv1_2_server_method(void);
26118 const SSL_METHOD *tlsv1_2_client_method(void);
26119 const SSL_METHOD *tlsv1_3_method(void);
26120 const SSL_METHOD *tlsv1_3_server_method(void);
26121 const SSL_METHOD *tlsv1_3_client_method(void);
26122 const SSL_METHOD *dtlsv1_method(void);
26123 const SSL_METHOD *dtlsv1_server_method(void);
26124 const SSL_METHOD *dtlsv1_client_method(void);
26125 const SSL_METHOD *dtls_bad_ver_client_method(void);
26126 const SSL_METHOD *dtlsv1_2_method(void);
26127 const SSL_METHOD *dtlsv1_2_server_method(void);
26128 const SSL_METHOD *dtlsv1_2_client_method(void);
26129
26130 extern const SSL3_ENC_METHOD TLSv1_enc_data;
26131 extern const SSL3_ENC_METHOD TLSv1_1_enc_data;
26132 extern const SSL3_ENC_METHOD TLSv1_2_enc_data;
26133 extern const SSL3_ENC_METHOD TLSv1_3_enc_data;
26134 extern const SSL3_ENC_METHOD SSLv3_enc_data;
26135 extern const SSL3_ENC_METHOD DTLSv1_enc_data;
26136 extern const SSL3_ENC_METHOD DTLSv1_2_enc_data;
26137 # 2401 "ssl/ssl_local.h"
26138 struct openssl_ssl_test_functions {
26139 int (*p_ssl_init_wbio_buffer) (SSL_CONNECTION *s);
26140 };
26141
26142 const char *ssl_protocol_to_string(int version);
26143
26144 static inline int tls12_rpk_and_privkey(const SSL_CONNECTION *sc, int idx)
26145 {
26146
26147
26148
26149
26150 return ((sc->server && sc->ext.server_cert_type == 2)
26151 || (!sc->server && sc->ext.client_cert_type == 2))
26152 && sc->cert->pkeys[idx].privatekey !=
26153 # 2415 "ssl/ssl_local.h" 3 4
26154 ((void *)0)
26155
26156 # 2416 "ssl/ssl_local.h"
26157 && sc->cert->pkeys[idx].x509 ==
26158 # 2416 "ssl/ssl_local.h" 3 4
26159 ((void *)0)
26160 # 2416 "ssl/ssl_local.h"
26161 ;
26162 }
26163
26164 static inline int ssl_has_cert_type(const SSL_CONNECTION *sc, unsigned char ct)
26165 {
26166 unsigned char *ptr;
26167 size_t len;
26168
26169 if (sc->server) {
26170 ptr = sc->server_cert_type;
26171 len = sc->server_cert_type_len;
26172 } else {
26173 ptr = sc->client_cert_type;
26174 len = sc->client_cert_type_len;
26175 }
26176
26177 if (ptr ==
26178 # 2432 "ssl/ssl_local.h" 3 4
26179 ((void *)0)
26180 # 2432 "ssl/ssl_local.h"
26181 )
26182 return 0;
26183
26184 return memchr(ptr, ct, len) !=
26185 # 2435 "ssl/ssl_local.h" 3 4
26186 ((void *)0)
26187 # 2435 "ssl/ssl_local.h"
26188 ;
26189 }
26190
26191
26192 static inline int ssl_has_cert(const SSL_CONNECTION *s, int idx)
26193 {
26194 if (idx < 0 || idx >= (int)s->ssl_pkey_num)
26195 return 0;
26196
26197
26198 if (ssl_has_cert_type(s, 2))
26199 return s->cert->pkeys[idx].privatekey !=
26200 # 2446 "ssl/ssl_local.h" 3 4
26201 ((void *)0)
26202 # 2446 "ssl/ssl_local.h"
26203 ;
26204
26205 return s->cert->pkeys[idx].x509 !=
26206 # 2448 "ssl/ssl_local.h" 3 4
26207 ((void *)0)
26208
26209 # 2449 "ssl/ssl_local.h"
26210 && s->cert->pkeys[idx].privatekey !=
26211 # 2449 "ssl/ssl_local.h" 3 4
26212 ((void *)0)
26213 # 2449 "ssl/ssl_local.h"
26214 ;
26215 }
26216
26217 static inline void tls1_get_peer_groups(SSL_CONNECTION *s,
26218 const uint16_t **pgroups,
26219 size_t *pgroupslen)
26220 {
26221 *pgroups = s->ext.peer_supportedgroups;
26222 *pgroupslen = s->ext.peer_supportedgroups_len;
26223 }
26224
26225
26226
26227 int ossl_ssl_init(SSL *ssl, SSL_CTX *ctx, const SSL_METHOD *method,
26228 int type);
26229 SSL *ossl_ssl_connection_new_int(SSL_CTX *ctx, const SSL_METHOD *method);
26230 SSL *ossl_ssl_connection_new(SSL_CTX *ctx);
26231 void ossl_ssl_connection_free(SSL *ssl);
26232 int ossl_ssl_connection_reset(SSL *ssl);
26233
26234 int ssl_read_internal(SSL *s, void *buf, size_t num, size_t *readbytes);
26235 int ssl_write_internal(SSL *s, const void *buf, size_t num,
26236 uint64_t flags, size_t *written);
26237 int ssl_clear_bad_session(SSL_CONNECTION *s);
26238 CERT *ssl_cert_new(size_t ssl_pkey_num);
26239 CERT *ssl_cert_dup(CERT *cert);
26240 void ssl_cert_clear_certs(CERT *c);
26241 void ssl_cert_free(CERT *c);
26242 int ssl_generate_session_id(SSL_CONNECTION *s, SSL_SESSION *ss);
26243 int ssl_get_new_session(SSL_CONNECTION *s, int session);
26244 SSL_SESSION *lookup_sess_in_cache(SSL_CONNECTION *s,
26245 const unsigned char *sess_id,
26246 size_t sess_id_len);
26247 int ssl_get_prev_session(SSL_CONNECTION *s, CLIENTHELLO_MSG *hello);
26248 SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket);
26249 int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b);
26250 SSL_CIPHER * OBJ_bsearch_ssl_cipher_id(SSL_CIPHER *key, SSL_CIPHER const *base, int num);
26251 int ssl_cipher_ptr_id_cmp(const SSL_CIPHER *const *ap,
26252 const SSL_CIPHER *const *bp);
26253 struct stack_st_SSL_CIPHER *ssl_create_cipher_list(SSL_CTX *ctx,
26254 struct stack_st_SSL_CIPHER *tls13_ciphersuites,
26255 struct stack_st_SSL_CIPHER **cipher_list,
26256 struct stack_st_SSL_CIPHER **cipher_list_by_id,
26257 const char *rule_str,
26258 CERT *c);
26259 int ssl_cache_cipherlist(SSL_CONNECTION *s, PACKET *cipher_suites,
26260 int sslv2format);
26261 int ossl_bytes_to_cipher_list(SSL_CONNECTION *s, PACKET *cipher_suites,
26262 struct stack_st_SSL_CIPHER **skp,
26263 struct stack_st_SSL_CIPHER **scsvs, int sslv2format,
26264 int fatal);
26265 void ssl_update_cache(SSL_CONNECTION *s, int mode);
26266 int ssl_cipher_get_evp_cipher(SSL_CTX *ctx, const SSL_CIPHER *sslc,
26267 const EVP_CIPHER **enc);
26268 int ssl_cipher_get_evp(SSL_CTX *ctxc, const SSL_SESSION *s,
26269 const EVP_CIPHER **enc, const EVP_MD **md,
26270 int *mac_pkey_type, size_t *mac_secret_size,
26271 SSL_COMP **comp, int use_etm);
26272 int ssl_cipher_get_overhead(const SSL_CIPHER *c, size_t *mac_overhead,
26273 size_t *int_overhead, size_t *blocksize,
26274 size_t *ext_overhead);
26275 int ssl_cert_is_disabled(SSL_CTX *ctx, size_t idx);
26276 const SSL_CIPHER *ssl_get_cipher_by_char(SSL_CONNECTION *ssl,
26277 const unsigned char *ptr,
26278 int all);
26279 int ssl_cert_set0_chain(SSL_CONNECTION *s, SSL_CTX *ctx,
26280 struct stack_st_X509 *chain);
26281 int ssl_cert_set1_chain(SSL_CONNECTION *s, SSL_CTX *ctx,
26282 struct stack_st_X509 *chain);
26283 int ssl_cert_add0_chain_cert(SSL_CONNECTION *s, SSL_CTX *ctx, X509 *x);
26284 int ssl_cert_add1_chain_cert(SSL_CONNECTION *s, SSL_CTX *ctx, X509 *x);
26285 int ssl_cert_select_current(CERT *c, X509 *x);
26286 int ssl_cert_set_current(CERT *c, long arg);
26287 void ssl_cert_set_cert_cb(CERT *c, int (*cb) (SSL *ssl, void *arg), void *arg);
26288
26289 int ssl_verify_cert_chain(SSL_CONNECTION *s, struct stack_st_X509 *sk);
26290 int ssl_verify_rpk(SSL_CONNECTION *s, EVP_PKEY *rpk);
26291 int ssl_build_cert_chain(SSL_CONNECTION *s, SSL_CTX *ctx, int flags);
26292 int ssl_cert_set_cert_store(CERT *c, X509_STORE *store, int chain,
26293 int ref);
26294 int ssl_cert_get_cert_store(CERT *c, X509_STORE **pstore, int chain);
26295
26296 int ssl_security(const SSL_CONNECTION *s, int op, int bits, int nid,
26297 void *other);
26298 int ssl_ctx_security(const SSL_CTX *ctx, int op, int bits, int nid,
26299 void *other);
26300 int ssl_get_security_level_bits(const SSL *s, const SSL_CTX *ctx, int *levelp);
26301
26302 int ssl_cert_lookup_by_nid(int nid, size_t *pidx, SSL_CTX *ctx);
26303 const SSL_CERT_LOOKUP *ssl_cert_lookup_by_pkey(const EVP_PKEY *pk,
26304 size_t *pidx,
26305 SSL_CTX *ctx);
26306 const SSL_CERT_LOOKUP *ssl_cert_lookup_by_idx(size_t idx, SSL_CTX *ctx);
26307
26308 int ssl_undefined_function(SSL *s);
26309 int ssl_undefined_void_function(void);
26310 int ssl_undefined_const_function(const SSL *s);
26311 int ssl_get_server_cert_serverinfo(SSL_CONNECTION *s,
26312 const unsigned char **serverinfo,
26313 size_t *serverinfo_length);
26314 void ssl_set_masks(SSL_CONNECTION *s);
26315 struct stack_st_SSL_CIPHER *ssl_get_ciphers_by_id(SSL_CONNECTION *sc);
26316 int ssl_x509err2alert(int type);
26317 void ssl_sort_cipher_list(void);
26318 int ssl_load_ciphers(SSL_CTX *ctx);
26319 int ssl_setup_sigalgs(SSL_CTX *ctx);
26320 int ssl_load_groups(SSL_CTX *ctx);
26321 int ssl_load_sigalgs(SSL_CTX *ctx);
26322 int ssl_fill_hello_random(SSL_CONNECTION *s, int server,
26323 unsigned char *field, size_t len,
26324 DOWNGRADE dgrd);
26325 int ssl_generate_master_secret(SSL_CONNECTION *s, unsigned char *pms,
26326 size_t pmslen, int free_pms);
26327 EVP_PKEY *ssl_generate_pkey(SSL_CONNECTION *s, EVP_PKEY *pm);
26328 int ssl_gensecret(SSL_CONNECTION *s, unsigned char *pms, size_t pmslen);
26329 int ssl_derive(SSL_CONNECTION *s, EVP_PKEY *privkey, EVP_PKEY *pubkey,
26330 int genmaster);
26331 int ssl_decapsulate(SSL_CONNECTION *s, EVP_PKEY *privkey,
26332 const unsigned char *ct, size_t ctlen,
26333 int gensecret);
26334 int ssl_encapsulate(SSL_CONNECTION *s, EVP_PKEY *pubkey,
26335 unsigned char **ctp, size_t *ctlenp,
26336 int gensecret);
26337 EVP_PKEY *ssl_dh_to_pkey(DH *dh);
26338 int ssl_set_tmp_ecdh_groups(uint16_t **pext, size_t *pextlen,
26339 void *key);
26340 unsigned int ssl_get_max_send_fragment(const SSL_CONNECTION *sc);
26341 unsigned int ssl_get_split_send_fragment(const SSL_CONNECTION *sc);
26342
26343 const SSL_CIPHER *ssl3_get_cipher_by_id(uint32_t id);
26344 const SSL_CIPHER *ssl3_get_cipher_by_std_name(const char *stdname);
26345 const SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p);
26346 int ssl3_put_cipher_by_char(const SSL_CIPHER *c, WPACKET *pkt,
26347 size_t *len);
26348 int ssl3_init_finished_mac(SSL_CONNECTION *s);
26349 int ssl3_setup_key_block(SSL_CONNECTION *s);
26350 int ssl3_change_cipher_state(SSL_CONNECTION *s, int which);
26351 void ssl3_cleanup_key_block(SSL_CONNECTION *s);
26352 int ssl3_do_write(SSL_CONNECTION *s, uint8_t type);
26353 int ssl3_send_alert(SSL_CONNECTION *s, int level, int desc);
26354 int ssl3_generate_master_secret(SSL_CONNECTION *s, unsigned char *out,
26355 unsigned char *p, size_t len,
26356 size_t *secret_size);
26357 int ssl3_get_req_cert_type(SSL_CONNECTION *s, WPACKET *pkt);
26358 int ssl3_num_ciphers(void);
26359 const SSL_CIPHER *ssl3_get_cipher(unsigned int u);
26360 int ssl3_renegotiate(SSL *ssl);
26361 int ssl3_renegotiate_check(SSL *ssl, int initok);
26362 void ssl3_digest_master_key_set_params(const SSL_SESSION *session,
26363 OSSL_PARAM params[]);
26364 int ssl3_dispatch_alert(SSL *s);
26365 size_t ssl3_final_finish_mac(SSL_CONNECTION *s, const char *sender,
26366 size_t slen, unsigned char *p);
26367 int ssl3_finish_mac(SSL_CONNECTION *s, const unsigned char *buf,
26368 size_t len);
26369 void ssl3_free_digest_list(SSL_CONNECTION *s);
26370 unsigned long ssl3_output_cert_chain(SSL_CONNECTION *s, WPACKET *pkt,
26371 CERT_PKEY *cpk, int for_comp);
26372 const SSL_CIPHER *ssl3_choose_cipher(SSL_CONNECTION *s,
26373 struct stack_st_SSL_CIPHER *clnt,
26374 struct stack_st_SSL_CIPHER *srvr);
26375 int ssl3_digest_cached_records(SSL_CONNECTION *s, int keep);
26376 int ssl3_new(SSL *s);
26377 void ssl3_free(SSL *s);
26378 int ssl3_read(SSL *s, void *buf, size_t len, size_t *readbytes);
26379 int ssl3_peek(SSL *s, void *buf, size_t len, size_t *readbytes);
26380 int ssl3_write(SSL *s, const void *buf, size_t len, size_t *written);
26381 int ssl3_shutdown(SSL *s);
26382 int ssl3_clear(SSL *s);
26383 long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg);
26384 long ssl3_ctx_ctrl(SSL_CTX *s, int cmd, long larg, void *parg);
26385 long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp) (void));
26386 long ssl3_ctx_callback_ctrl(SSL_CTX *s, int cmd, void (*fp) (void));
26387
26388 int ssl3_do_change_cipher_spec(SSL_CONNECTION *s);
26389 OSSL_TIME ssl3_default_timeout(void);
26390
26391 int ssl3_set_handshake_header(SSL_CONNECTION *s, WPACKET *pkt,
26392 int htype);
26393 int tls_close_construct_packet(SSL_CONNECTION *s, WPACKET *pkt, int htype);
26394 int tls_setup_handshake(SSL_CONNECTION *s);
26395 int dtls1_set_handshake_header(SSL_CONNECTION *s, WPACKET *pkt, int htype);
26396 int dtls1_close_construct_packet(SSL_CONNECTION *s, WPACKET *pkt, int htype);
26397 int ssl3_handshake_write(SSL_CONNECTION *s);
26398
26399 int ssl_allow_compression(SSL_CONNECTION *s);
26400
26401 int ssl_version_cmp(const SSL_CONNECTION *s, int versiona, int versionb);
26402 int ssl_version_supported(const SSL_CONNECTION *s, int version,
26403 const SSL_METHOD **meth);
26404
26405 int ssl_set_client_hello_version(SSL_CONNECTION *s);
26406 int ssl_check_version_downgrade(SSL_CONNECTION *s);
26407 int ssl_set_version_bound(int method_version, int version, int *bound);
26408 int ssl_choose_server_version(SSL_CONNECTION *s, CLIENTHELLO_MSG *hello,
26409 DOWNGRADE *dgrd);
26410 int ssl_choose_client_version(SSL_CONNECTION *s, int version,
26411 RAW_EXTENSION *extensions);
26412 int ssl_get_min_max_version(const SSL_CONNECTION *s, int *min_version,
26413 int *max_version, int *real_max);
26414
26415 OSSL_TIME tls1_default_timeout(void);
26416 int dtls1_do_write(SSL_CONNECTION *s, uint8_t type);
26417 void dtls1_set_message_header(SSL_CONNECTION *s,
26418 unsigned char mt,
26419 size_t len,
26420 size_t frag_off, size_t frag_len);
26421
26422 int dtls1_write_app_data_bytes(SSL *s, uint8_t type, const void *buf_,
26423 size_t len, size_t *written);
26424
26425 int dtls1_read_failed(SSL_CONNECTION *s, int code);
26426 int dtls1_buffer_message(SSL_CONNECTION *s, int ccs);
26427 int dtls1_retransmit_message(SSL_CONNECTION *s, unsigned short seq,
26428 int *found);
26429 int dtls1_get_queue_priority(unsigned short seq, int is_ccs);
26430 int dtls1_retransmit_buffered_messages(SSL_CONNECTION *s);
26431 void dtls1_clear_received_buffer(SSL_CONNECTION *s);
26432 void dtls1_clear_sent_buffer(SSL_CONNECTION *s);
26433 void dtls1_get_message_header(const unsigned char *data,
26434 struct hm_header_st *msg_hdr);
26435 OSSL_TIME dtls1_default_timeout(void);
26436 int dtls1_get_timeout(const SSL_CONNECTION *s, OSSL_TIME *timeleft);
26437 int dtls1_check_timeout_num(SSL_CONNECTION *s);
26438 int dtls1_handle_timeout(SSL_CONNECTION *s);
26439 void dtls1_start_timer(SSL_CONNECTION *s);
26440 void dtls1_stop_timer(SSL_CONNECTION *s);
26441 int dtls1_is_timer_expired(SSL_CONNECTION *s);
26442 int dtls_raw_hello_verify_request(WPACKET *pkt, unsigned char *cookie,
26443 size_t cookie_len);
26444 size_t dtls1_min_mtu(SSL_CONNECTION *s);
26445 void dtls1_hm_fragment_free(hm_fragment *frag);
26446 int dtls1_query_mtu(SSL_CONNECTION *s);
26447
26448 int tls1_new(SSL *s);
26449 void tls1_free(SSL *s);
26450 int tls1_clear(SSL *s);
26451
26452 int dtls1_new(SSL *s);
26453 void dtls1_free(SSL *s);
26454 int dtls1_clear(SSL *s);
26455 long dtls1_ctrl(SSL *s, int cmd, long larg, void *parg);
26456 int dtls1_shutdown(SSL *s);
26457
26458 int dtls1_dispatch_alert(SSL *s);
26459
26460 int ssl_init_wbio_buffer(SSL_CONNECTION *s);
26461 int ssl_free_wbio_buffer(SSL_CONNECTION *s);
26462
26463 int tls1_change_cipher_state(SSL_CONNECTION *s, int which);
26464 int tls1_setup_key_block(SSL_CONNECTION *s);
26465 size_t tls1_final_finish_mac(SSL_CONNECTION *s, const char *str,
26466 size_t slen, unsigned char *p);
26467 int tls1_generate_master_secret(SSL_CONNECTION *s, unsigned char *out,
26468 unsigned char *p, size_t len,
26469 size_t *secret_size);
26470 int tls13_setup_key_block(SSL_CONNECTION *s);
26471 size_t tls13_final_finish_mac(SSL_CONNECTION *s, const char *str, size_t slen,
26472 unsigned char *p);
26473 int tls13_change_cipher_state(SSL_CONNECTION *s, int which);
26474 int tls13_update_key(SSL_CONNECTION *s, int send);
26475 int tls13_hkdf_expand(SSL_CONNECTION *s,
26476 const EVP_MD *md,
26477 const unsigned char *secret,
26478 const unsigned char *label, size_t labellen,
26479 const unsigned char *data, size_t datalen,
26480 unsigned char *out, size_t outlen, int fatal);
26481 int tls13_hkdf_expand_ex(OSSL_LIB_CTX *libctx, const char *propq,
26482 const EVP_MD *md,
26483 const unsigned char *secret,
26484 const unsigned char *label, size_t labellen,
26485 const unsigned char *data, size_t datalen,
26486 unsigned char *out, size_t outlen,
26487 int raise_error);
26488 int tls13_derive_key(SSL_CONNECTION *s, const EVP_MD *md,
26489 const unsigned char *secret, unsigned char *key,
26490 size_t keylen);
26491 int tls13_derive_iv(SSL_CONNECTION *s, const EVP_MD *md,
26492 const unsigned char *secret, unsigned char *iv,
26493 size_t ivlen);
26494 int tls13_derive_finishedkey(SSL_CONNECTION *s, const EVP_MD *md,
26495 const unsigned char *secret,
26496 unsigned char *fin, size_t finlen);
26497 int tls13_generate_secret(SSL_CONNECTION *s, const EVP_MD *md,
26498 const unsigned char *prevsecret,
26499 const unsigned char *insecret,
26500 size_t insecretlen,
26501 unsigned char *outsecret);
26502 int tls13_generate_handshake_secret(SSL_CONNECTION *s,
26503 const unsigned char *insecret,
26504 size_t insecretlen);
26505 int tls13_generate_master_secret(SSL_CONNECTION *s, unsigned char *out,
26506 unsigned char *prev, size_t prevlen,
26507 size_t *secret_size);
26508 int tls1_export_keying_material(SSL_CONNECTION *s,
26509 unsigned char *out, size_t olen,
26510 const char *label, size_t llen,
26511 const unsigned char *p, size_t plen,
26512 int use_context);
26513 int tls13_export_keying_material(SSL_CONNECTION *s,
26514 unsigned char *out, size_t olen,
26515 const char *label, size_t llen,
26516 const unsigned char *context,
26517 size_t contextlen, int use_context);
26518 int tls13_export_keying_material_early(SSL_CONNECTION *s,
26519 unsigned char *out, size_t olen,
26520 const char *label, size_t llen,
26521 const unsigned char *context,
26522 size_t contextlen);
26523 int tls1_alert_code(int code);
26524 int tls13_alert_code(int code);
26525 int ssl3_alert_code(int code);
26526
26527 int ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL_CONNECTION *s);
26528
26529 SSL_COMP *ssl3_comp_find(struct stack_st_SSL_COMP *sk, int n);
26530
26531 const TLS_GROUP_INFO *tls1_group_id_lookup(SSL_CTX *ctx, uint16_t curve_id);
26532 const char *tls1_group_id2name(SSL_CTX *ctx, uint16_t group_id);
26533 int tls1_group_id2nid(uint16_t group_id, int include_unknown);
26534 uint16_t tls1_nid2group_id(int nid);
26535 int tls1_check_group_id(SSL_CONNECTION *s, uint16_t group_id,
26536 int check_own_curves);
26537 uint16_t tls1_shared_group(SSL_CONNECTION *s, int nmatch);
26538 int tls1_set_groups(uint16_t **pext, size_t *pextlen,
26539 int *curves, size_t ncurves);
26540 int tls1_set_groups_list(SSL_CTX *ctx, uint16_t **pext, size_t *pextlen,
26541 const char *str);
26542 EVP_PKEY *ssl_generate_pkey_group(SSL_CONNECTION *s, uint16_t id);
26543 int tls_valid_group(SSL_CONNECTION *s, uint16_t group_id, int minversion,
26544 int maxversion, int isec, int *okfortls13);
26545 EVP_PKEY *ssl_generate_param_group(SSL_CONNECTION *s, uint16_t id);
26546 void tls1_get_formatlist(SSL_CONNECTION *s, const unsigned char **pformats,
26547 size_t *num_formats);
26548 int tls1_check_ec_tmp_key(SSL_CONNECTION *s, unsigned long id);
26549
26550 int tls_group_allowed(SSL_CONNECTION *s, uint16_t curve, int op);
26551 void tls1_get_supported_groups(SSL_CONNECTION *s, const uint16_t **pgroups,
26552 size_t *pgroupslen);
26553
26554 int tls1_set_server_sigalgs(SSL_CONNECTION *s);
26555
26556 SSL_TICKET_STATUS tls_get_ticket_from_client(SSL_CONNECTION *s,
26557 CLIENTHELLO_MSG *hello,
26558 SSL_SESSION **ret);
26559 SSL_TICKET_STATUS tls_decrypt_ticket(SSL_CONNECTION *s,
26560 const unsigned char *etick,
26561 size_t eticklen,
26562 const unsigned char *sess_id,
26563 size_t sesslen, SSL_SESSION **psess);
26564
26565 int tls_use_ticket(SSL_CONNECTION *s);
26566
26567 void ssl_set_sig_mask(uint32_t *pmask_a, SSL_CONNECTION *s, int op);
26568
26569 int tls1_set_sigalgs_list(CERT *c, const char *str, int client);
26570 int tls1_set_raw_sigalgs(CERT *c, const uint16_t *psigs, size_t salglen,
26571 int client);
26572 int tls1_set_sigalgs(CERT *c, const int *salg, size_t salglen,
26573 int client);
26574 int tls1_check_chain(SSL_CONNECTION *s, X509 *x, EVP_PKEY *pk,
26575 struct stack_st_X509 *chain, int idx);
26576 void tls1_set_cert_validity(SSL_CONNECTION *s);
26577
26578
26579 int ssl_validate_ct(SSL_CONNECTION *s);
26580
26581
26582 EVP_PKEY *ssl_get_auto_dh(SSL_CONNECTION *s);
26583
26584 int ssl_security_cert(SSL_CONNECTION *s, SSL_CTX *ctx, X509 *x, int vfy,
26585 int is_ee);
26586 int ssl_security_cert_chain(SSL_CONNECTION *s, struct stack_st_X509 *sk,
26587 X509 *ex, int vfy);
26588
26589 int tls_choose_sigalg(SSL_CONNECTION *s, int fatalerrs);
26590
26591 long ssl_get_algorithm2(SSL_CONNECTION *s);
26592 int tls12_copy_sigalgs(SSL_CONNECTION *s, WPACKET *pkt,
26593 const uint16_t *psig, size_t psiglen);
26594 int tls1_save_u16(PACKET *pkt, uint16_t **pdest, size_t *pdestlen);
26595 int tls1_save_sigalgs(SSL_CONNECTION *s, PACKET *pkt, int cert);
26596 int tls1_process_sigalgs(SSL_CONNECTION *s);
26597 int tls1_set_peer_legacy_sigalg(SSL_CONNECTION *s, const EVP_PKEY *pkey);
26598 int tls1_lookup_md(SSL_CTX *ctx, const SIGALG_LOOKUP *lu,
26599 const EVP_MD **pmd);
26600 size_t tls12_get_psigalgs(SSL_CONNECTION *s, int sent,
26601 const uint16_t **psigs);
26602 int tls_check_sigalg_curve(const SSL_CONNECTION *s, int curve);
26603 int tls12_check_peer_sigalg(SSL_CONNECTION *s, uint16_t, EVP_PKEY *pkey);
26604 int ssl_set_client_disabled(SSL_CONNECTION *s);
26605 int ssl_cipher_disabled(const SSL_CONNECTION *s, const SSL_CIPHER *c,
26606 int op, int echde);
26607
26608 int ssl_handshake_hash(SSL_CONNECTION *s,
26609 unsigned char *out, size_t outlen,
26610 size_t *hashlen);
26611 const EVP_MD *ssl_md(SSL_CTX *ctx, int idx);
26612 int ssl_get_md_idx(int md_nid);
26613 const EVP_MD *ssl_handshake_md(SSL_CONNECTION *s);
26614 const EVP_MD *ssl_prf_md(SSL_CONNECTION *s);
26615
26616
26617
26618
26619
26620
26621
26622 int ssl_log_rsa_client_key_exchange(SSL_CONNECTION *s,
26623 const uint8_t *encrypted_premaster,
26624 size_t encrypted_premaster_len,
26625 const uint8_t *premaster,
26626 size_t premaster_len);
26627
26628
26629
26630
26631
26632
26633 int ssl_log_secret(SSL_CONNECTION *s, const char *label,
26634 const uint8_t *secret, size_t secret_len);
26635 # 2882 "ssl/ssl_local.h"
26636 int srp_generate_server_master_secret(SSL_CONNECTION *s);
26637 int srp_generate_client_master_secret(SSL_CONNECTION *s);
26638 int srp_verify_server_param(SSL_CONNECTION *s);
26639
26640
26641
26642 int send_certificate_request(SSL_CONNECTION *s);
26643
26644
26645
26646 custom_ext_method *custom_ext_find(const custom_ext_methods *exts,
26647 ENDPOINT role, unsigned int ext_type,
26648 size_t *idx);
26649
26650 void custom_ext_init(custom_ext_methods *meths);
26651
26652 int ossl_tls_add_custom_ext_intern(SSL_CTX *ctx, custom_ext_methods *exts,
26653 ENDPOINT role, unsigned int ext_type,
26654 unsigned int context,
26655 SSL_custom_ext_add_cb_ex add_cb,
26656 SSL_custom_ext_free_cb_ex free_cb,
26657 void *add_arg,
26658 SSL_custom_ext_parse_cb_ex parse_cb,
26659 void *parse_arg);
26660 int custom_ext_parse(SSL_CONNECTION *s, unsigned int context,
26661 unsigned int ext_type,
26662 const unsigned char *ext_data, size_t ext_size,
26663 X509 *x, size_t chainidx);
26664 int custom_ext_add(SSL_CONNECTION *s, int context, WPACKET *pkt, X509 *x,
26665 size_t chainidx, int maxversion);
26666
26667 int custom_exts_copy(custom_ext_methods *dst,
26668 const custom_ext_methods *src);
26669 int custom_exts_copy_flags(custom_ext_methods *dst,
26670 const custom_ext_methods *src);
26671 void custom_exts_free(custom_ext_methods *exts);
26672
26673 void ssl_comp_free_compression_methods_int(void);
26674
26675
26676 void ssl_ctx_system_config(SSL_CTX *ctx);
26677
26678 const EVP_CIPHER *ssl_evp_cipher_fetch(OSSL_LIB_CTX *libctx,
26679 int nid,
26680 const char *properties);
26681 int ssl_evp_cipher_up_ref(const EVP_CIPHER *cipher);
26682 void ssl_evp_cipher_free(const EVP_CIPHER *cipher);
26683 const EVP_MD *ssl_evp_md_fetch(OSSL_LIB_CTX *libctx,
26684 int nid,
26685 const char *properties);
26686 int ssl_evp_md_up_ref(const EVP_MD *md);
26687 void ssl_evp_md_free(const EVP_MD *md);
26688
26689 void tls_engine_finish(ENGINE *e);
26690 const EVP_CIPHER *tls_get_cipher_from_engine(int nid);
26691 const EVP_MD *tls_get_digest_from_engine(int nid);
26692 int tls_engine_load_ssl_client_cert(SSL_CONNECTION *s, X509 **px509,
26693 EVP_PKEY **ppkey);
26694 int ssl_hmac_old_new(SSL_HMAC *ret);
26695 void ssl_hmac_old_free(SSL_HMAC *ctx);
26696 int ssl_hmac_old_init(SSL_HMAC *ctx, void *key, size_t len, char *md);
26697 int ssl_hmac_old_update(SSL_HMAC *ctx, const unsigned char *data, size_t len);
26698 int ssl_hmac_old_final(SSL_HMAC *ctx, unsigned char *md, size_t *len);
26699 size_t ssl_hmac_old_size(const SSL_HMAC *ctx);
26700
26701 int ssl_ctx_srp_ctx_free_intern(SSL_CTX *ctx);
26702 int ssl_ctx_srp_ctx_init_intern(SSL_CTX *ctx);
26703 int ssl_srp_ctx_free_intern(SSL_CONNECTION *s);
26704 int ssl_srp_ctx_init_intern(SSL_CONNECTION *s);
26705
26706 int ssl_srp_calc_a_param_intern(SSL_CONNECTION *s);
26707 int ssl_srp_server_param_with_username_intern(SSL_CONNECTION *s, int *ad);
26708
26709 void ssl_session_calculate_timeout(SSL_SESSION *ss);
26710 # 2964 "ssl/ssl_local.h"
26711 static __attribute__((unused)) inline int ssl_tsan_lock(const SSL_CTX *ctx)
26712 {
26713
26714
26715
26716
26717 return 1;
26718 }
26719
26720 static __attribute__((unused)) inline void ssl_tsan_unlock(const SSL_CTX *ctx)
26721 {
26722
26723
26724
26725 }
26726
26727 static __attribute__((unused)) inline void ssl_tsan_counter(const SSL_CTX *ctx,
26728 _Atomic int *stat)
26729 {
26730 if (ssl_tsan_lock(ctx)) {
26731
26732 # 2984 "ssl/ssl_local.h" 3 4
26733 __atomic_fetch_add ((
26734 # 2984 "ssl/ssl_local.h"
26735 ((stat))
26736 # 2984 "ssl/ssl_local.h" 3 4
26737 ), (
26738 # 2984 "ssl/ssl_local.h"
26739 (1)
26740 # 2984 "ssl/ssl_local.h" 3 4
26741 ), (
26742 # 2984 "ssl/ssl_local.h"
26743 memory_order_relaxed
26744 # 2984 "ssl/ssl_local.h" 3 4
26745 ))
26746 # 2984 "ssl/ssl_local.h"
26747 ;
26748 ssl_tsan_unlock(ctx);
26749 }
26750 }
26751
26752 int ossl_comp_has_alg(int a);
26753 size_t ossl_calculate_comp_expansion(int alg, size_t length);
26754
26755 void ossl_ssl_set_custom_record_layer(SSL_CONNECTION *s,
26756 const OSSL_RECORD_METHOD *meth,
26757 void *rlarg);
26758
26759 long ossl_ctrl_internal(SSL *s, int cmd, long larg, void *parg, int no_quic);
26760 # 14 "ssl/ssl_lib.c" 2
26761
26762
26763 # 1 "include/openssl/x509v3.h" 1
26764 # 17 "include/openssl/x509v3.h"
26765
26766 # 27 "include/openssl/x509v3.h"
26767 # 1 "include/openssl/x509v3err.h" 1
26768 # 13 "include/openssl/x509v3err.h"
26769
26770 # 28 "include/openssl/x509v3.h" 2
26771 # 37 "include/openssl/x509v3.h"
26772 struct v3_ext_method;
26773 struct v3_ext_ctx;
26774
26775
26776
26777 typedef void *(*X509V3_EXT_NEW)(void);
26778 typedef void (*X509V3_EXT_FREE) (void *);
26779 typedef void *(*X509V3_EXT_D2I)(void *, const unsigned char **, long);
26780 typedef int (*X509V3_EXT_I2D) (const void *, unsigned char **);
26781 typedef struct stack_st_CONF_VALUE *
26782 (*X509V3_EXT_I2V) (const struct v3_ext_method *method, void *ext,
26783 struct stack_st_CONF_VALUE *extlist);
26784 typedef void *(*X509V3_EXT_V2I)(const struct v3_ext_method *method,
26785 struct v3_ext_ctx *ctx,
26786 struct stack_st_CONF_VALUE *values);
26787 typedef char *(*X509V3_EXT_I2S)(const struct v3_ext_method *method,
26788 void *ext);
26789 typedef void *(*X509V3_EXT_S2I)(const struct v3_ext_method *method,
26790 struct v3_ext_ctx *ctx, const char *str);
26791 typedef int (*X509V3_EXT_I2R) (const struct v3_ext_method *method, void *ext,
26792 BIO *out, int indent);
26793 typedef void *(*X509V3_EXT_R2I)(const struct v3_ext_method *method,
26794 struct v3_ext_ctx *ctx, const char *str);
26795
26796
26797
26798 struct v3_ext_method {
26799 int ext_nid;
26800 int ext_flags;
26801
26802 ASN1_ITEM_EXP *it;
26803
26804 X509V3_EXT_NEW ext_new;
26805 X509V3_EXT_FREE ext_free;
26806 X509V3_EXT_D2I d2i;
26807 X509V3_EXT_I2D i2d;
26808
26809 X509V3_EXT_I2S i2s;
26810 X509V3_EXT_S2I s2i;
26811
26812 X509V3_EXT_I2V i2v;
26813 X509V3_EXT_V2I v2i;
26814
26815 X509V3_EXT_I2R i2r;
26816 X509V3_EXT_R2I r2i;
26817 void *usr_data;
26818 };
26819
26820 typedef struct X509V3_CONF_METHOD_st {
26821 char *(*get_string) (void *db, const char *section, const char *value);
26822 struct stack_st_CONF_VALUE *(*get_section) (void *db, const char *section);
26823 void (*free_string) (void *db, char *string);
26824 void (*free_section) (void *db, struct stack_st_CONF_VALUE *section);
26825 } X509V3_CONF_METHOD;
26826
26827
26828 struct v3_ext_ctx {
26829
26830
26831
26832
26833
26834 int flags;
26835 X509 *issuer_cert;
26836 X509 *subject_cert;
26837 X509_REQ *subject_req;
26838 X509_CRL *crl;
26839 X509V3_CONF_METHOD *db_meth;
26840 void *db;
26841 EVP_PKEY *issuer_pkey;
26842
26843 };
26844
26845 typedef struct v3_ext_method X509V3_EXT_METHOD;
26846
26847 struct stack_st_X509V3_EXT_METHOD; typedef int (*sk_X509V3_EXT_METHOD_compfunc)(const X509V3_EXT_METHOD * const *a, const X509V3_EXT_METHOD *const *b); typedef void (*sk_X509V3_EXT_METHOD_freefunc)(X509V3_EXT_METHOD *a); typedef X509V3_EXT_METHOD * (*sk_X509V3_EXT_METHOD_copyfunc)(const X509V3_EXT_METHOD *a); static __attribute__((unused)) inline X509V3_EXT_METHOD *ossl_check_X509V3_EXT_METHOD_type(X509V3_EXT_METHOD *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509V3_EXT_METHOD_sk_type(const struct stack_st_X509V3_EXT_METHOD *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509V3_EXT_METHOD_sk_type(struct stack_st_X509V3_EXT_METHOD *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509V3_EXT_METHOD_compfunc_type(sk_X509V3_EXT_METHOD_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509V3_EXT_METHOD_copyfunc_type(sk_X509V3_EXT_METHOD_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509V3_EXT_METHOD_freefunc_type(sk_X509V3_EXT_METHOD_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26848 # 145 "include/openssl/x509v3.h"
26849 typedef BIT_STRING_BITNAME ENUMERATED_NAMES;
26850
26851 typedef struct BASIC_CONSTRAINTS_st {
26852 int ca;
26853 ASN1_INTEGER *pathlen;
26854 } BASIC_CONSTRAINTS;
26855
26856 typedef struct PKEY_USAGE_PERIOD_st {
26857 ASN1_GENERALIZEDTIME *notBefore;
26858 ASN1_GENERALIZEDTIME *notAfter;
26859 } PKEY_USAGE_PERIOD;
26860
26861 typedef struct otherName_st {
26862 ASN1_OBJECT *type_id;
26863 ASN1_TYPE *value;
26864 } OTHERNAME;
26865
26866 typedef struct EDIPartyName_st {
26867 ASN1_STRING *nameAssigner;
26868 ASN1_STRING *partyName;
26869 } EDIPARTYNAME;
26870
26871 typedef struct GENERAL_NAME_st {
26872 # 177 "include/openssl/x509v3.h"
26873 int type;
26874 union {
26875 char *ptr;
26876 OTHERNAME *otherName;
26877 ASN1_IA5STRING *rfc822Name;
26878 ASN1_IA5STRING *dNSName;
26879 ASN1_STRING *x400Address;
26880 X509_NAME *directoryName;
26881 EDIPARTYNAME *ediPartyName;
26882 ASN1_IA5STRING *uniformResourceIdentifier;
26883 ASN1_OCTET_STRING *iPAddress;
26884 ASN1_OBJECT *registeredID;
26885
26886 ASN1_OCTET_STRING *ip;
26887 X509_NAME *dirn;
26888 ASN1_IA5STRING *ia5;
26889
26890 ASN1_OBJECT *rid;
26891 ASN1_TYPE *other;
26892 } d;
26893 } GENERAL_NAME;
26894
26895 typedef struct ACCESS_DESCRIPTION_st {
26896 ASN1_OBJECT *method;
26897 GENERAL_NAME *location;
26898 } ACCESS_DESCRIPTION;
26899
26900 struct stack_st_ACCESS_DESCRIPTION; typedef int (*sk_ACCESS_DESCRIPTION_compfunc)(const ACCESS_DESCRIPTION * const *a, const ACCESS_DESCRIPTION *const *b); typedef void (*sk_ACCESS_DESCRIPTION_freefunc)(ACCESS_DESCRIPTION *a); typedef ACCESS_DESCRIPTION * (*sk_ACCESS_DESCRIPTION_copyfunc)(const ACCESS_DESCRIPTION *a); static __attribute__((unused)) inline ACCESS_DESCRIPTION *ossl_check_ACCESS_DESCRIPTION_type(ACCESS_DESCRIPTION *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ACCESS_DESCRIPTION_sk_type(const struct stack_st_ACCESS_DESCRIPTION *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ACCESS_DESCRIPTION_sk_type(struct stack_st_ACCESS_DESCRIPTION *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ACCESS_DESCRIPTION_compfunc_type(sk_ACCESS_DESCRIPTION_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ACCESS_DESCRIPTION_copyfunc_type(sk_ACCESS_DESCRIPTION_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ACCESS_DESCRIPTION_freefunc_type(sk_ACCESS_DESCRIPTION_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26901 # 230 "include/openssl/x509v3.h"
26902 struct stack_st_GENERAL_NAME; typedef int (*sk_GENERAL_NAME_compfunc)(const GENERAL_NAME * const *a, const GENERAL_NAME *const *b); typedef void (*sk_GENERAL_NAME_freefunc)(GENERAL_NAME *a); typedef GENERAL_NAME * (*sk_GENERAL_NAME_copyfunc)(const GENERAL_NAME *a); static __attribute__((unused)) inline GENERAL_NAME *ossl_check_GENERAL_NAME_type(GENERAL_NAME *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_GENERAL_NAME_sk_type(const struct stack_st_GENERAL_NAME *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_GENERAL_NAME_sk_type(struct stack_st_GENERAL_NAME *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_GENERAL_NAME_compfunc_type(sk_GENERAL_NAME_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_GENERAL_NAME_copyfunc_type(sk_GENERAL_NAME_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_GENERAL_NAME_freefunc_type(sk_GENERAL_NAME_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26903 # 258 "include/openssl/x509v3.h"
26904 typedef struct stack_st_ACCESS_DESCRIPTION AUTHORITY_INFO_ACCESS;
26905 typedef struct stack_st_ASN1_OBJECT EXTENDED_KEY_USAGE;
26906 typedef struct stack_st_ASN1_INTEGER TLS_FEATURE;
26907 typedef struct stack_st_GENERAL_NAME GENERAL_NAMES;
26908
26909 struct stack_st_GENERAL_NAMES; typedef int (*sk_GENERAL_NAMES_compfunc)(const GENERAL_NAMES * const *a, const GENERAL_NAMES *const *b); typedef void (*sk_GENERAL_NAMES_freefunc)(GENERAL_NAMES *a); typedef GENERAL_NAMES * (*sk_GENERAL_NAMES_copyfunc)(const GENERAL_NAMES *a); static __attribute__((unused)) inline GENERAL_NAMES *ossl_check_GENERAL_NAMES_type(GENERAL_NAMES *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_GENERAL_NAMES_sk_type(const struct stack_st_GENERAL_NAMES *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_GENERAL_NAMES_sk_type(struct stack_st_GENERAL_NAMES *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_GENERAL_NAMES_compfunc_type(sk_GENERAL_NAMES_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_GENERAL_NAMES_copyfunc_type(sk_GENERAL_NAMES_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_GENERAL_NAMES_freefunc_type(sk_GENERAL_NAMES_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26910 # 291 "include/openssl/x509v3.h"
26911 typedef struct DIST_POINT_NAME_st {
26912 int type;
26913 union {
26914 GENERAL_NAMES *fullname;
26915 struct stack_st_X509_NAME_ENTRY *relativename;
26916 } name;
26917
26918 X509_NAME *dpname;
26919 } DIST_POINT_NAME;
26920 # 315 "include/openssl/x509v3.h"
26921 struct DIST_POINT_st {
26922 DIST_POINT_NAME *distpoint;
26923 ASN1_BIT_STRING *reasons;
26924 GENERAL_NAMES *CRLissuer;
26925 int dp_reasons;
26926 };
26927
26928 struct stack_st_DIST_POINT; typedef int (*sk_DIST_POINT_compfunc)(const DIST_POINT * const *a, const DIST_POINT *const *b); typedef void (*sk_DIST_POINT_freefunc)(DIST_POINT *a); typedef DIST_POINT * (*sk_DIST_POINT_copyfunc)(const DIST_POINT *a); static __attribute__((unused)) inline DIST_POINT *ossl_check_DIST_POINT_type(DIST_POINT *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_DIST_POINT_sk_type(const struct stack_st_DIST_POINT *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_DIST_POINT_sk_type(struct stack_st_DIST_POINT *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_DIST_POINT_compfunc_type(sk_DIST_POINT_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_DIST_POINT_copyfunc_type(sk_DIST_POINT_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_DIST_POINT_freefunc_type(sk_DIST_POINT_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26929 # 350 "include/openssl/x509v3.h"
26930 typedef struct stack_st_DIST_POINT CRL_DIST_POINTS;
26931
26932 struct AUTHORITY_KEYID_st {
26933 ASN1_OCTET_STRING *keyid;
26934 GENERAL_NAMES *issuer;
26935 ASN1_INTEGER *serial;
26936 };
26937
26938
26939
26940 typedef struct SXNET_ID_st {
26941 ASN1_INTEGER *zone;
26942 ASN1_OCTET_STRING *user;
26943 } SXNETID;
26944
26945 struct stack_st_SXNETID; typedef int (*sk_SXNETID_compfunc)(const SXNETID * const *a, const SXNETID *const *b); typedef void (*sk_SXNETID_freefunc)(SXNETID *a); typedef SXNETID * (*sk_SXNETID_copyfunc)(const SXNETID *a); static __attribute__((unused)) inline SXNETID *ossl_check_SXNETID_type(SXNETID *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_SXNETID_sk_type(const struct stack_st_SXNETID *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_SXNETID_sk_type(struct stack_st_SXNETID *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_SXNETID_compfunc_type(sk_SXNETID_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_SXNETID_copyfunc_type(sk_SXNETID_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_SXNETID_freefunc_type(sk_SXNETID_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26946 # 394 "include/openssl/x509v3.h"
26947 typedef struct SXNET_st {
26948 ASN1_INTEGER *version;
26949 struct stack_st_SXNETID *ids;
26950 } SXNET;
26951
26952 typedef struct ISSUER_SIGN_TOOL_st {
26953 ASN1_UTF8STRING *signTool;
26954 ASN1_UTF8STRING *cATool;
26955 ASN1_UTF8STRING *signToolCert;
26956 ASN1_UTF8STRING *cAToolCert;
26957 } ISSUER_SIGN_TOOL;
26958
26959 typedef struct NOTICEREF_st {
26960 ASN1_STRING *organization;
26961 struct stack_st_ASN1_INTEGER *noticenos;
26962 } NOTICEREF;
26963
26964 typedef struct USERNOTICE_st {
26965 NOTICEREF *noticeref;
26966 ASN1_STRING *exptext;
26967 } USERNOTICE;
26968
26969 typedef struct POLICYQUALINFO_st {
26970 ASN1_OBJECT *pqualid;
26971 union {
26972 ASN1_IA5STRING *cpsuri;
26973 USERNOTICE *usernotice;
26974 ASN1_TYPE *other;
26975 } d;
26976 } POLICYQUALINFO;
26977
26978 struct stack_st_POLICYQUALINFO; typedef int (*sk_POLICYQUALINFO_compfunc)(const POLICYQUALINFO * const *a, const POLICYQUALINFO *const *b); typedef void (*sk_POLICYQUALINFO_freefunc)(POLICYQUALINFO *a); typedef POLICYQUALINFO * (*sk_POLICYQUALINFO_copyfunc)(const POLICYQUALINFO *a); static __attribute__((unused)) inline POLICYQUALINFO *ossl_check_POLICYQUALINFO_type(POLICYQUALINFO *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_POLICYQUALINFO_sk_type(const struct stack_st_POLICYQUALINFO *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_POLICYQUALINFO_sk_type(struct stack_st_POLICYQUALINFO *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_POLICYQUALINFO_compfunc_type(sk_POLICYQUALINFO_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_POLICYQUALINFO_copyfunc_type(sk_POLICYQUALINFO_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_POLICYQUALINFO_freefunc_type(sk_POLICYQUALINFO_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26979 # 454 "include/openssl/x509v3.h"
26980 typedef struct POLICYINFO_st {
26981 ASN1_OBJECT *policyid;
26982 struct stack_st_POLICYQUALINFO *qualifiers;
26983 } POLICYINFO;
26984
26985 struct stack_st_POLICYINFO; typedef int (*sk_POLICYINFO_compfunc)(const POLICYINFO * const *a, const POLICYINFO *const *b); typedef void (*sk_POLICYINFO_freefunc)(POLICYINFO *a); typedef POLICYINFO * (*sk_POLICYINFO_copyfunc)(const POLICYINFO *a); static __attribute__((unused)) inline POLICYINFO *ossl_check_POLICYINFO_type(POLICYINFO *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_POLICYINFO_sk_type(const struct stack_st_POLICYINFO *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_POLICYINFO_sk_type(struct stack_st_POLICYINFO *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_POLICYINFO_compfunc_type(sk_POLICYINFO_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_POLICYINFO_copyfunc_type(sk_POLICYINFO_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_POLICYINFO_freefunc_type(sk_POLICYINFO_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26986 # 487 "include/openssl/x509v3.h"
26987 typedef struct stack_st_POLICYINFO CERTIFICATEPOLICIES;
26988
26989 typedef struct POLICY_MAPPING_st {
26990 ASN1_OBJECT *issuerDomainPolicy;
26991 ASN1_OBJECT *subjectDomainPolicy;
26992 } POLICY_MAPPING;
26993
26994 struct stack_st_POLICY_MAPPING; typedef int (*sk_POLICY_MAPPING_compfunc)(const POLICY_MAPPING * const *a, const POLICY_MAPPING *const *b); typedef void (*sk_POLICY_MAPPING_freefunc)(POLICY_MAPPING *a); typedef POLICY_MAPPING * (*sk_POLICY_MAPPING_copyfunc)(const POLICY_MAPPING *a); static __attribute__((unused)) inline POLICY_MAPPING *ossl_check_POLICY_MAPPING_type(POLICY_MAPPING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_POLICY_MAPPING_sk_type(const struct stack_st_POLICY_MAPPING *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_POLICY_MAPPING_sk_type(struct stack_st_POLICY_MAPPING *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_POLICY_MAPPING_compfunc_type(sk_POLICY_MAPPING_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_POLICY_MAPPING_copyfunc_type(sk_POLICY_MAPPING_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_POLICY_MAPPING_freefunc_type(sk_POLICY_MAPPING_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26995 # 522 "include/openssl/x509v3.h"
26996 typedef struct stack_st_POLICY_MAPPING POLICY_MAPPINGS;
26997
26998 typedef struct GENERAL_SUBTREE_st {
26999 GENERAL_NAME *base;
27000 ASN1_INTEGER *minimum;
27001 ASN1_INTEGER *maximum;
27002 } GENERAL_SUBTREE;
27003
27004 struct stack_st_GENERAL_SUBTREE; typedef int (*sk_GENERAL_SUBTREE_compfunc)(const GENERAL_SUBTREE * const *a, const GENERAL_SUBTREE *const *b); typedef void (*sk_GENERAL_SUBTREE_freefunc)(GENERAL_SUBTREE *a); typedef GENERAL_SUBTREE * (*sk_GENERAL_SUBTREE_copyfunc)(const GENERAL_SUBTREE *a); static __attribute__((unused)) inline GENERAL_SUBTREE *ossl_check_GENERAL_SUBTREE_type(GENERAL_SUBTREE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_GENERAL_SUBTREE_sk_type(const struct stack_st_GENERAL_SUBTREE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_GENERAL_SUBTREE_sk_type(struct stack_st_GENERAL_SUBTREE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_GENERAL_SUBTREE_compfunc_type(sk_GENERAL_SUBTREE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_GENERAL_SUBTREE_copyfunc_type(sk_GENERAL_SUBTREE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_GENERAL_SUBTREE_freefunc_type(sk_GENERAL_SUBTREE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27005 # 558 "include/openssl/x509v3.h"
27006 struct NAME_CONSTRAINTS_st {
27007 struct stack_st_GENERAL_SUBTREE *permittedSubtrees;
27008 struct stack_st_GENERAL_SUBTREE *excludedSubtrees;
27009 };
27010
27011 typedef struct POLICY_CONSTRAINTS_st {
27012 ASN1_INTEGER *requireExplicitPolicy;
27013 ASN1_INTEGER *inhibitPolicyMapping;
27014 } POLICY_CONSTRAINTS;
27015
27016
27017 typedef struct PROXY_POLICY_st {
27018 ASN1_OBJECT *policyLanguage;
27019 ASN1_OCTET_STRING *policy;
27020 } PROXY_POLICY;
27021
27022 typedef struct PROXY_CERT_INFO_EXTENSION_st {
27023 ASN1_INTEGER *pcPathLengthConstraint;
27024 PROXY_POLICY *proxyPolicy;
27025 } PROXY_CERT_INFO_EXTENSION;
27026
27027 extern PROXY_POLICY *PROXY_POLICY_new(void); extern void PROXY_POLICY_free(PROXY_POLICY *a); extern PROXY_POLICY *d2i_PROXY_POLICY(PROXY_POLICY **a, const unsigned char **in, long len); extern int i2d_PROXY_POLICY(const PROXY_POLICY *a, unsigned char **out); extern const ASN1_ITEM * PROXY_POLICY_it(void);
27028 extern PROXY_CERT_INFO_EXTENSION *PROXY_CERT_INFO_EXTENSION_new(void); extern void PROXY_CERT_INFO_EXTENSION_free(PROXY_CERT_INFO_EXTENSION *a); extern PROXY_CERT_INFO_EXTENSION *d2i_PROXY_CERT_INFO_EXTENSION(PROXY_CERT_INFO_EXTENSION **a, const unsigned char **in, long len); extern int i2d_PROXY_CERT_INFO_EXTENSION(const PROXY_CERT_INFO_EXTENSION *a, unsigned char **out); extern const ASN1_ITEM * PROXY_CERT_INFO_EXTENSION_it(void);
27029
27030 struct ISSUING_DIST_POINT_st {
27031 DIST_POINT_NAME *distpoint;
27032 int onlyuser;
27033 int onlyCA;
27034 ASN1_BIT_STRING *onlysomereasons;
27035 int indirectCRL;
27036 int onlyattr;
27037 };
27038 # 697 "include/openssl/x509v3.h"
27039 typedef struct x509_purpose_st {
27040 int purpose;
27041 int trust;
27042 int flags;
27043 int (*check_purpose) (const struct x509_purpose_st *, const X509 *, int);
27044 char *name;
27045 char *sname;
27046 void *usr_data;
27047 } X509_PURPOSE;
27048
27049 struct stack_st_X509_PURPOSE; typedef int (*sk_X509_PURPOSE_compfunc)(const X509_PURPOSE * const *a, const X509_PURPOSE *const *b); typedef void (*sk_X509_PURPOSE_freefunc)(X509_PURPOSE *a); typedef X509_PURPOSE * (*sk_X509_PURPOSE_copyfunc)(const X509_PURPOSE *a); static __attribute__((unused)) inline X509_PURPOSE *ossl_check_X509_PURPOSE_type(X509_PURPOSE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_PURPOSE_sk_type(const struct stack_st_X509_PURPOSE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_PURPOSE_sk_type(struct stack_st_X509_PURPOSE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_PURPOSE_compfunc_type(sk_X509_PURPOSE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_PURPOSE_copyfunc_type(sk_X509_PURPOSE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_PURPOSE_freefunc_type(sk_X509_PURPOSE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27050 # 773 "include/openssl/x509v3.h"
27051 extern BASIC_CONSTRAINTS *BASIC_CONSTRAINTS_new(void); extern void BASIC_CONSTRAINTS_free(BASIC_CONSTRAINTS *a); extern BASIC_CONSTRAINTS *d2i_BASIC_CONSTRAINTS(BASIC_CONSTRAINTS **a, const unsigned char **in, long len); extern int i2d_BASIC_CONSTRAINTS(const BASIC_CONSTRAINTS *a, unsigned char **out); extern const ASN1_ITEM * BASIC_CONSTRAINTS_it(void);
27052
27053 extern SXNET *SXNET_new(void); extern void SXNET_free(SXNET *a); extern SXNET *d2i_SXNET(SXNET **a, const unsigned char **in, long len); extern int i2d_SXNET(const SXNET *a, unsigned char **out); extern const ASN1_ITEM * SXNET_it(void);
27054 extern SXNETID *SXNETID_new(void); extern void SXNETID_free(SXNETID *a); extern SXNETID *d2i_SXNETID(SXNETID **a, const unsigned char **in, long len); extern int i2d_SXNETID(const SXNETID *a, unsigned char **out); extern const ASN1_ITEM * SXNETID_it(void);
27055
27056 extern ISSUER_SIGN_TOOL *ISSUER_SIGN_TOOL_new(void); extern void ISSUER_SIGN_TOOL_free(ISSUER_SIGN_TOOL *a); extern ISSUER_SIGN_TOOL *d2i_ISSUER_SIGN_TOOL(ISSUER_SIGN_TOOL **a, const unsigned char **in, long len); extern int i2d_ISSUER_SIGN_TOOL(const ISSUER_SIGN_TOOL *a, unsigned char **out); extern const ASN1_ITEM * ISSUER_SIGN_TOOL_it(void);
27057
27058 int SXNET_add_id_asc(SXNET **psx, const char *zone, const char *user, int userlen);
27059 int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, const char *user,
27060 int userlen);
27061 int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *izone, const char *user,
27062 int userlen);
27063
27064 ASN1_OCTET_STRING *SXNET_get_id_asc(SXNET *sx, const char *zone);
27065 ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone);
27066 ASN1_OCTET_STRING *SXNET_get_id_INTEGER(SXNET *sx, ASN1_INTEGER *zone);
27067
27068 extern AUTHORITY_KEYID *AUTHORITY_KEYID_new(void); extern void AUTHORITY_KEYID_free(AUTHORITY_KEYID *a); extern AUTHORITY_KEYID *d2i_AUTHORITY_KEYID(AUTHORITY_KEYID **a, const unsigned char **in, long len); extern int i2d_AUTHORITY_KEYID(const AUTHORITY_KEYID *a, unsigned char **out); extern const ASN1_ITEM * AUTHORITY_KEYID_it(void);
27069
27070 extern PKEY_USAGE_PERIOD *PKEY_USAGE_PERIOD_new(void); extern void PKEY_USAGE_PERIOD_free(PKEY_USAGE_PERIOD *a); extern PKEY_USAGE_PERIOD *d2i_PKEY_USAGE_PERIOD(PKEY_USAGE_PERIOD **a, const unsigned char **in, long len); extern int i2d_PKEY_USAGE_PERIOD(const PKEY_USAGE_PERIOD *a, unsigned char **out); extern const ASN1_ITEM * PKEY_USAGE_PERIOD_it(void);
27071
27072 extern GENERAL_NAME *GENERAL_NAME_new(void); extern void GENERAL_NAME_free(GENERAL_NAME *a); extern GENERAL_NAME *d2i_GENERAL_NAME(GENERAL_NAME **a, const unsigned char **in, long len); extern int i2d_GENERAL_NAME(const GENERAL_NAME *a, unsigned char **out); extern const ASN1_ITEM * GENERAL_NAME_it(void);
27073 extern GENERAL_NAME *GENERAL_NAME_dup(const GENERAL_NAME *a);
27074 int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b);
27075
27076 ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method,
27077 X509V3_CTX *ctx,
27078 struct stack_st_CONF_VALUE *nval);
27079 struct stack_st_CONF_VALUE *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method,
27080 ASN1_BIT_STRING *bits,
27081 struct stack_st_CONF_VALUE *extlist);
27082 char *i2s_ASN1_IA5STRING(X509V3_EXT_METHOD *method, ASN1_IA5STRING *ia5);
27083 ASN1_IA5STRING *s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method,
27084 X509V3_CTX *ctx, const char *str);
27085 char *i2s_ASN1_UTF8STRING(X509V3_EXT_METHOD *method, ASN1_UTF8STRING *utf8);
27086 ASN1_UTF8STRING *s2i_ASN1_UTF8STRING(X509V3_EXT_METHOD *method,
27087 X509V3_CTX *ctx, const char *str);
27088
27089 struct stack_st_CONF_VALUE *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,
27090 GENERAL_NAME *gen,
27091 struct stack_st_CONF_VALUE *ret);
27092 int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen);
27093
27094 extern GENERAL_NAMES *GENERAL_NAMES_new(void); extern void GENERAL_NAMES_free(GENERAL_NAMES *a); extern GENERAL_NAMES *d2i_GENERAL_NAMES(GENERAL_NAMES **a, const unsigned char **in, long len); extern int i2d_GENERAL_NAMES(const GENERAL_NAMES *a, unsigned char **out); extern const ASN1_ITEM * GENERAL_NAMES_it(void);
27095
27096 struct stack_st_CONF_VALUE *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method,
27097 GENERAL_NAMES *gen,
27098 struct stack_st_CONF_VALUE *extlist);
27099 GENERAL_NAMES *v2i_GENERAL_NAMES(const X509V3_EXT_METHOD *method,
27100 X509V3_CTX *ctx, struct stack_st_CONF_VALUE *nval);
27101
27102 extern OTHERNAME *OTHERNAME_new(void); extern void OTHERNAME_free(OTHERNAME *a); extern OTHERNAME *d2i_OTHERNAME(OTHERNAME **a, const unsigned char **in, long len); extern int i2d_OTHERNAME(const OTHERNAME *a, unsigned char **out); extern const ASN1_ITEM * OTHERNAME_it(void);
27103 extern EDIPARTYNAME *EDIPARTYNAME_new(void); extern void EDIPARTYNAME_free(EDIPARTYNAME *a); extern EDIPARTYNAME *d2i_EDIPARTYNAME(EDIPARTYNAME **a, const unsigned char **in, long len); extern int i2d_EDIPARTYNAME(const EDIPARTYNAME *a, unsigned char **out); extern const ASN1_ITEM * EDIPARTYNAME_it(void);
27104 int OTHERNAME_cmp(OTHERNAME *a, OTHERNAME *b);
27105 void GENERAL_NAME_set0_value(GENERAL_NAME *a, int type, void *value);
27106 void *GENERAL_NAME_get0_value(const GENERAL_NAME *a, int *ptype);
27107 int GENERAL_NAME_set0_othername(GENERAL_NAME *gen,
27108 ASN1_OBJECT *oid, ASN1_TYPE *value);
27109 int GENERAL_NAME_get0_otherName(const GENERAL_NAME *gen,
27110 ASN1_OBJECT **poid, ASN1_TYPE **pvalue);
27111
27112 char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
27113 const ASN1_OCTET_STRING *ia5);
27114 ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
27115 X509V3_CTX *ctx, const char *str);
27116
27117 extern EXTENDED_KEY_USAGE *EXTENDED_KEY_USAGE_new(void); extern void EXTENDED_KEY_USAGE_free(EXTENDED_KEY_USAGE *a); extern EXTENDED_KEY_USAGE *d2i_EXTENDED_KEY_USAGE(EXTENDED_KEY_USAGE **a, const unsigned char **in, long len); extern int i2d_EXTENDED_KEY_USAGE(const EXTENDED_KEY_USAGE *a, unsigned char **out); extern const ASN1_ITEM * EXTENDED_KEY_USAGE_it(void);
27118 int i2a_ACCESS_DESCRIPTION(BIO *bp, const ACCESS_DESCRIPTION *a);
27119
27120 extern TLS_FEATURE *TLS_FEATURE_new(void); extern void TLS_FEATURE_free(TLS_FEATURE *a);
27121
27122 extern CERTIFICATEPOLICIES *CERTIFICATEPOLICIES_new(void); extern void CERTIFICATEPOLICIES_free(CERTIFICATEPOLICIES *a); extern CERTIFICATEPOLICIES *d2i_CERTIFICATEPOLICIES(CERTIFICATEPOLICIES **a, const unsigned char **in, long len); extern int i2d_CERTIFICATEPOLICIES(const CERTIFICATEPOLICIES *a, unsigned char **out); extern const ASN1_ITEM * CERTIFICATEPOLICIES_it(void);
27123 extern POLICYINFO *POLICYINFO_new(void); extern void POLICYINFO_free(POLICYINFO *a); extern POLICYINFO *d2i_POLICYINFO(POLICYINFO **a, const unsigned char **in, long len); extern int i2d_POLICYINFO(const POLICYINFO *a, unsigned char **out); extern const ASN1_ITEM * POLICYINFO_it(void);
27124 extern POLICYQUALINFO *POLICYQUALINFO_new(void); extern void POLICYQUALINFO_free(POLICYQUALINFO *a); extern POLICYQUALINFO *d2i_POLICYQUALINFO(POLICYQUALINFO **a, const unsigned char **in, long len); extern int i2d_POLICYQUALINFO(const POLICYQUALINFO *a, unsigned char **out); extern const ASN1_ITEM * POLICYQUALINFO_it(void);
27125 extern USERNOTICE *USERNOTICE_new(void); extern void USERNOTICE_free(USERNOTICE *a); extern USERNOTICE *d2i_USERNOTICE(USERNOTICE **a, const unsigned char **in, long len); extern int i2d_USERNOTICE(const USERNOTICE *a, unsigned char **out); extern const ASN1_ITEM * USERNOTICE_it(void);
27126 extern NOTICEREF *NOTICEREF_new(void); extern void NOTICEREF_free(NOTICEREF *a); extern NOTICEREF *d2i_NOTICEREF(NOTICEREF **a, const unsigned char **in, long len); extern int i2d_NOTICEREF(const NOTICEREF *a, unsigned char **out); extern const ASN1_ITEM * NOTICEREF_it(void);
27127
27128 extern CRL_DIST_POINTS *CRL_DIST_POINTS_new(void); extern void CRL_DIST_POINTS_free(CRL_DIST_POINTS *a); extern CRL_DIST_POINTS *d2i_CRL_DIST_POINTS(CRL_DIST_POINTS **a, const unsigned char **in, long len); extern int i2d_CRL_DIST_POINTS(const CRL_DIST_POINTS *a, unsigned char **out); extern const ASN1_ITEM * CRL_DIST_POINTS_it(void);
27129 extern DIST_POINT *DIST_POINT_new(void); extern void DIST_POINT_free(DIST_POINT *a); extern DIST_POINT *d2i_DIST_POINT(DIST_POINT **a, const unsigned char **in, long len); extern int i2d_DIST_POINT(const DIST_POINT *a, unsigned char **out); extern const ASN1_ITEM * DIST_POINT_it(void);
27130 extern DIST_POINT_NAME *DIST_POINT_NAME_new(void); extern void DIST_POINT_NAME_free(DIST_POINT_NAME *a); extern DIST_POINT_NAME *d2i_DIST_POINT_NAME(DIST_POINT_NAME **a, const unsigned char **in, long len); extern int i2d_DIST_POINT_NAME(const DIST_POINT_NAME *a, unsigned char **out); extern const ASN1_ITEM * DIST_POINT_NAME_it(void);
27131 extern ISSUING_DIST_POINT *ISSUING_DIST_POINT_new(void); extern void ISSUING_DIST_POINT_free(ISSUING_DIST_POINT *a); extern ISSUING_DIST_POINT *d2i_ISSUING_DIST_POINT(ISSUING_DIST_POINT **a, const unsigned char **in, long len); extern int i2d_ISSUING_DIST_POINT(const ISSUING_DIST_POINT *a, unsigned char **out); extern const ASN1_ITEM * ISSUING_DIST_POINT_it(void);
27132
27133 int DIST_POINT_set_dpname(DIST_POINT_NAME *dpn, const X509_NAME *iname);
27134
27135 int NAME_CONSTRAINTS_check(X509 *x, NAME_CONSTRAINTS *nc);
27136 int NAME_CONSTRAINTS_check_CN(X509 *x, NAME_CONSTRAINTS *nc);
27137
27138 extern ACCESS_DESCRIPTION *ACCESS_DESCRIPTION_new(void); extern void ACCESS_DESCRIPTION_free(ACCESS_DESCRIPTION *a); extern ACCESS_DESCRIPTION *d2i_ACCESS_DESCRIPTION(ACCESS_DESCRIPTION **a, const unsigned char **in, long len); extern int i2d_ACCESS_DESCRIPTION(const ACCESS_DESCRIPTION *a, unsigned char **out); extern const ASN1_ITEM * ACCESS_DESCRIPTION_it(void);
27139 extern AUTHORITY_INFO_ACCESS *AUTHORITY_INFO_ACCESS_new(void); extern void AUTHORITY_INFO_ACCESS_free(AUTHORITY_INFO_ACCESS *a); extern AUTHORITY_INFO_ACCESS *d2i_AUTHORITY_INFO_ACCESS(AUTHORITY_INFO_ACCESS **a, const unsigned char **in, long len); extern int i2d_AUTHORITY_INFO_ACCESS(const AUTHORITY_INFO_ACCESS *a, unsigned char **out); extern const ASN1_ITEM * AUTHORITY_INFO_ACCESS_it(void);
27140
27141 extern const ASN1_ITEM * POLICY_MAPPING_it(void);
27142 extern POLICY_MAPPING *POLICY_MAPPING_new(void); extern void POLICY_MAPPING_free(POLICY_MAPPING *a);
27143 extern const ASN1_ITEM * POLICY_MAPPINGS_it(void);
27144
27145 extern const ASN1_ITEM * GENERAL_SUBTREE_it(void);
27146 extern GENERAL_SUBTREE *GENERAL_SUBTREE_new(void); extern void GENERAL_SUBTREE_free(GENERAL_SUBTREE *a);
27147
27148 extern const ASN1_ITEM * NAME_CONSTRAINTS_it(void);
27149 extern NAME_CONSTRAINTS *NAME_CONSTRAINTS_new(void); extern void NAME_CONSTRAINTS_free(NAME_CONSTRAINTS *a);
27150
27151 extern POLICY_CONSTRAINTS *POLICY_CONSTRAINTS_new(void); extern void POLICY_CONSTRAINTS_free(POLICY_CONSTRAINTS *a);
27152 extern const ASN1_ITEM * POLICY_CONSTRAINTS_it(void);
27153
27154 GENERAL_NAME *a2i_GENERAL_NAME(GENERAL_NAME *out,
27155 const X509V3_EXT_METHOD *method,
27156 X509V3_CTX *ctx, int gen_type,
27157 const char *value, int is_nc);
27158
27159
27160 GENERAL_NAME *v2i_GENERAL_NAME(const X509V3_EXT_METHOD *method,
27161 X509V3_CTX *ctx, CONF_VALUE *cnf);
27162 GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
27163 const X509V3_EXT_METHOD *method,
27164 X509V3_CTX *ctx, CONF_VALUE *cnf,
27165 int is_nc);
27166
27167 void X509V3_conf_free(CONF_VALUE *val);
27168
27169 X509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid,
27170 const char *value);
27171 X509_EXTENSION *X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, const char *name,
27172 const char *value);
27173 int X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, const char *section,
27174 struct stack_st_X509_EXTENSION **sk);
27175 int X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
27176 X509 *cert);
27177 int X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
27178 X509_REQ *req);
27179 int X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
27180 X509_CRL *crl);
27181
27182 X509_EXTENSION *X509V3_EXT_conf_nid(struct lhash_st_CONF_VALUE *conf,
27183 X509V3_CTX *ctx, int ext_nid,
27184 const char *value);
27185 X509_EXTENSION *X509V3_EXT_conf(struct lhash_st_CONF_VALUE *conf, X509V3_CTX *ctx,
27186 const char *name, const char *value);
27187 int X509V3_EXT_add_conf(struct lhash_st_CONF_VALUE *conf, X509V3_CTX *ctx,
27188 const char *section, X509 *cert);
27189 int X509V3_EXT_REQ_add_conf(struct lhash_st_CONF_VALUE *conf, X509V3_CTX *ctx,
27190 const char *section, X509_REQ *req);
27191 int X509V3_EXT_CRL_add_conf(struct lhash_st_CONF_VALUE *conf, X509V3_CTX *ctx,
27192 const char *section, X509_CRL *crl);
27193
27194 int X509V3_add_value_bool_nf(const char *name, int asn1_bool,
27195 struct stack_st_CONF_VALUE **extlist);
27196 int X509V3_get_value_bool(const CONF_VALUE *value, int *asn1_bool);
27197 int X509V3_get_value_int(const CONF_VALUE *value, ASN1_INTEGER **aint);
27198 void X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf);
27199 void X509V3_set_conf_lhash(X509V3_CTX *ctx, struct lhash_st_CONF_VALUE *lhash);
27200
27201
27202 char *X509V3_get_string(X509V3_CTX *ctx, const char *name, const char *section);
27203 struct stack_st_CONF_VALUE *X509V3_get_section(X509V3_CTX *ctx, const char *section);
27204 void X509V3_string_free(X509V3_CTX *ctx, char *str);
27205 void X509V3_section_free(X509V3_CTX *ctx, struct stack_st_CONF_VALUE *section);
27206 void X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subject,
27207 X509_REQ *req, X509_CRL *crl, int flags);
27208
27209 int X509V3_set_issuer_pkey(X509V3_CTX *ctx, EVP_PKEY *pkey);
27210
27211 int X509V3_add_value(const char *name, const char *value,
27212 struct stack_st_CONF_VALUE **extlist);
27213 int X509V3_add_value_uchar(const char *name, const unsigned char *value,
27214 struct stack_st_CONF_VALUE **extlist);
27215 int X509V3_add_value_bool(const char *name, int asn1_bool,
27216 struct stack_st_CONF_VALUE **extlist);
27217 int X509V3_add_value_int(const char *name, const ASN1_INTEGER *aint,
27218 struct stack_st_CONF_VALUE **extlist);
27219 char *i2s_ASN1_INTEGER(X509V3_EXT_METHOD *meth, const ASN1_INTEGER *aint);
27220 ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *meth, const char *value);
27221 char *i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *meth, const ASN1_ENUMERATED *aint);
27222 char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *meth,
27223 const ASN1_ENUMERATED *aint);
27224 int X509V3_EXT_add(X509V3_EXT_METHOD *ext);
27225 int X509V3_EXT_add_list(X509V3_EXT_METHOD *extlist);
27226 int X509V3_EXT_add_alias(int nid_to, int nid_from);
27227 void X509V3_EXT_cleanup(void);
27228
27229 const X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext);
27230 const X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid);
27231 int X509V3_add_standard_extensions(void);
27232 struct stack_st_CONF_VALUE *X509V3_parse_list(const char *line);
27233 void *X509V3_EXT_d2i(X509_EXTENSION *ext);
27234 void *X509V3_get_d2i(const struct stack_st_X509_EXTENSION *x, int nid, int *crit,
27235 int *idx);
27236
27237 X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc);
27238 int X509V3_add1_i2d(struct stack_st_X509_EXTENSION **x, int nid, void *value,
27239 int crit, unsigned long flags);
27240
27241
27242
27243
27244
27245
27246
27247 void X509V3_EXT_val_prn(BIO *out, struct stack_st_CONF_VALUE *val, int indent,
27248 int ml);
27249 int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag,
27250 int indent);
27251
27252 int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent);
27253
27254 int X509V3_extensions_print(BIO *out, const char *title,
27255 const struct stack_st_X509_EXTENSION *exts,
27256 unsigned long flag, int indent);
27257
27258 int X509_check_ca(X509 *x);
27259 int X509_check_purpose(X509 *x, int id, int ca);
27260 int X509_supported_extension(X509_EXTENSION *ex);
27261 int X509_PURPOSE_set(int *p, int purpose);
27262 int X509_check_issued(X509 *issuer, X509 *subject);
27263 int X509_check_akid(const X509 *issuer, const AUTHORITY_KEYID *akid);
27264 void X509_set_proxy_flag(X509 *x);
27265 void X509_set_proxy_pathlen(X509 *x, long l);
27266 long X509_get_proxy_pathlen(X509 *x);
27267
27268 uint32_t X509_get_extension_flags(X509 *x);
27269 uint32_t X509_get_key_usage(X509 *x);
27270 uint32_t X509_get_extended_key_usage(X509 *x);
27271 const ASN1_OCTET_STRING *X509_get0_subject_key_id(X509 *x);
27272 const ASN1_OCTET_STRING *X509_get0_authority_key_id(X509 *x);
27273 const GENERAL_NAMES *X509_get0_authority_issuer(X509 *x);
27274 const ASN1_INTEGER *X509_get0_authority_serial(X509 *x);
27275
27276 int X509_PURPOSE_get_count(void);
27277 X509_PURPOSE *X509_PURPOSE_get0(int idx);
27278 int X509_PURPOSE_get_by_sname(const char *sname);
27279 int X509_PURPOSE_get_by_id(int id);
27280 int X509_PURPOSE_add(int id, int trust, int flags,
27281 int (*ck) (const X509_PURPOSE *, const X509 *, int),
27282 const char *name, const char *sname, void *arg);
27283 char *X509_PURPOSE_get0_name(const X509_PURPOSE *xp);
27284 char *X509_PURPOSE_get0_sname(const X509_PURPOSE *xp);
27285 int X509_PURPOSE_get_trust(const X509_PURPOSE *xp);
27286 void X509_PURPOSE_cleanup(void);
27287 int X509_PURPOSE_get_id(const X509_PURPOSE *);
27288
27289 struct stack_st_OPENSSL_STRING *X509_get1_email(X509 *x);
27290 struct stack_st_OPENSSL_STRING *X509_REQ_get1_email(X509_REQ *x);
27291 void X509_email_free(struct stack_st_OPENSSL_STRING *sk);
27292 struct stack_st_OPENSSL_STRING *X509_get1_ocsp(X509 *x);
27293 # 1038 "include/openssl/x509v3.h"
27294 int X509_check_host(X509 *x, const char *chk, size_t chklen,
27295 unsigned int flags, char **peername);
27296 int X509_check_email(X509 *x, const char *chk, size_t chklen,
27297 unsigned int flags);
27298 int X509_check_ip(X509 *x, const unsigned char *chk, size_t chklen,
27299 unsigned int flags);
27300 int X509_check_ip_asc(X509 *x, const char *ipasc, unsigned int flags);
27301
27302 ASN1_OCTET_STRING *a2i_IPADDRESS(const char *ipasc);
27303 ASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc);
27304 int X509V3_NAME_from_section(X509_NAME *nm, struct stack_st_CONF_VALUE *dn_sk,
27305 unsigned long chtype);
27306
27307 void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent);
27308 struct stack_st_X509_POLICY_NODE; typedef int (*sk_X509_POLICY_NODE_compfunc)(const X509_POLICY_NODE * const *a, const X509_POLICY_NODE *const *b); typedef void (*sk_X509_POLICY_NODE_freefunc)(X509_POLICY_NODE *a); typedef X509_POLICY_NODE * (*sk_X509_POLICY_NODE_copyfunc)(const X509_POLICY_NODE *a); static __attribute__((unused)) inline X509_POLICY_NODE *ossl_check_X509_POLICY_NODE_type(X509_POLICY_NODE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_POLICY_NODE_sk_type(const struct stack_st_X509_POLICY_NODE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_POLICY_NODE_sk_type(struct stack_st_X509_POLICY_NODE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_POLICY_NODE_compfunc_type(sk_X509_POLICY_NODE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_POLICY_NODE_copyfunc_type(sk_X509_POLICY_NODE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_POLICY_NODE_freefunc_type(sk_X509_POLICY_NODE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27309 # 1082 "include/openssl/x509v3.h"
27310 typedef struct ASRange_st {
27311 ASN1_INTEGER *min, *max;
27312 } ASRange;
27313
27314
27315
27316
27317 typedef struct ASIdOrRange_st {
27318 int type;
27319 union {
27320 ASN1_INTEGER *id;
27321 ASRange *range;
27322 } u;
27323 } ASIdOrRange;
27324
27325 struct stack_st_ASIdOrRange; typedef int (*sk_ASIdOrRange_compfunc)(const ASIdOrRange * const *a, const ASIdOrRange *const *b); typedef void (*sk_ASIdOrRange_freefunc)(ASIdOrRange *a); typedef ASIdOrRange * (*sk_ASIdOrRange_copyfunc)(const ASIdOrRange *a); static __attribute__((unused)) inline ASIdOrRange *ossl_check_ASIdOrRange_type(ASIdOrRange *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASIdOrRange_sk_type(const struct stack_st_ASIdOrRange *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASIdOrRange_sk_type(struct stack_st_ASIdOrRange *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASIdOrRange_compfunc_type(sk_ASIdOrRange_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASIdOrRange_copyfunc_type(sk_ASIdOrRange_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASIdOrRange_freefunc_type(sk_ASIdOrRange_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27326 # 1125 "include/openssl/x509v3.h"
27327 typedef struct stack_st_ASIdOrRange ASIdOrRanges;
27328
27329
27330
27331
27332 typedef struct ASIdentifierChoice_st {
27333 int type;
27334 union {
27335 ASN1_NULL *inherit;
27336 ASIdOrRanges *asIdsOrRanges;
27337 } u;
27338 } ASIdentifierChoice;
27339
27340 typedef struct ASIdentifiers_st {
27341 ASIdentifierChoice *asnum, *rdi;
27342 } ASIdentifiers;
27343
27344 extern ASRange *ASRange_new(void); extern void ASRange_free(ASRange *a); extern ASRange *d2i_ASRange(ASRange **a, const unsigned char **in, long len); extern int i2d_ASRange(const ASRange *a, unsigned char **out); extern const ASN1_ITEM * ASRange_it(void);
27345 extern ASIdOrRange *ASIdOrRange_new(void); extern void ASIdOrRange_free(ASIdOrRange *a); extern ASIdOrRange *d2i_ASIdOrRange(ASIdOrRange **a, const unsigned char **in, long len); extern int i2d_ASIdOrRange(const ASIdOrRange *a, unsigned char **out); extern const ASN1_ITEM * ASIdOrRange_it(void);
27346 extern ASIdentifierChoice *ASIdentifierChoice_new(void); extern void ASIdentifierChoice_free(ASIdentifierChoice *a); extern ASIdentifierChoice *d2i_ASIdentifierChoice(ASIdentifierChoice **a, const unsigned char **in, long len); extern int i2d_ASIdentifierChoice(const ASIdentifierChoice *a, unsigned char **out); extern const ASN1_ITEM * ASIdentifierChoice_it(void);
27347 extern ASIdentifiers *ASIdentifiers_new(void); extern void ASIdentifiers_free(ASIdentifiers *a); extern ASIdentifiers *d2i_ASIdentifiers(ASIdentifiers **a, const unsigned char **in, long len); extern int i2d_ASIdentifiers(const ASIdentifiers *a, unsigned char **out); extern const ASN1_ITEM * ASIdentifiers_it(void);
27348
27349 typedef struct IPAddressRange_st {
27350 ASN1_BIT_STRING *min, *max;
27351 } IPAddressRange;
27352
27353
27354
27355
27356 typedef struct IPAddressOrRange_st {
27357 int type;
27358 union {
27359 ASN1_BIT_STRING *addressPrefix;
27360 IPAddressRange *addressRange;
27361 } u;
27362 } IPAddressOrRange;
27363
27364 struct stack_st_IPAddressOrRange; typedef int (*sk_IPAddressOrRange_compfunc)(const IPAddressOrRange * const *a, const IPAddressOrRange *const *b); typedef void (*sk_IPAddressOrRange_freefunc)(IPAddressOrRange *a); typedef IPAddressOrRange * (*sk_IPAddressOrRange_copyfunc)(const IPAddressOrRange *a); static __attribute__((unused)) inline IPAddressOrRange *ossl_check_IPAddressOrRange_type(IPAddressOrRange *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_IPAddressOrRange_sk_type(const struct stack_st_IPAddressOrRange *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_IPAddressOrRange_sk_type(struct stack_st_IPAddressOrRange *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_IPAddressOrRange_compfunc_type(sk_IPAddressOrRange_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_IPAddressOrRange_copyfunc_type(sk_IPAddressOrRange_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_IPAddressOrRange_freefunc_type(sk_IPAddressOrRange_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27365 # 1190 "include/openssl/x509v3.h"
27366 typedef struct stack_st_IPAddressOrRange IPAddressOrRanges;
27367
27368
27369
27370
27371 typedef struct IPAddressChoice_st {
27372 int type;
27373 union {
27374 ASN1_NULL *inherit;
27375 IPAddressOrRanges *addressesOrRanges;
27376 } u;
27377 } IPAddressChoice;
27378
27379 typedef struct IPAddressFamily_st {
27380 ASN1_OCTET_STRING *addressFamily;
27381 IPAddressChoice *ipAddressChoice;
27382 } IPAddressFamily;
27383
27384 struct stack_st_IPAddressFamily; typedef int (*sk_IPAddressFamily_compfunc)(const IPAddressFamily * const *a, const IPAddressFamily *const *b); typedef void (*sk_IPAddressFamily_freefunc)(IPAddressFamily *a); typedef IPAddressFamily * (*sk_IPAddressFamily_copyfunc)(const IPAddressFamily *a); static __attribute__((unused)) inline IPAddressFamily *ossl_check_IPAddressFamily_type(IPAddressFamily *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_IPAddressFamily_sk_type(const struct stack_st_IPAddressFamily *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_IPAddressFamily_sk_type(struct stack_st_IPAddressFamily *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_IPAddressFamily_compfunc_type(sk_IPAddressFamily_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_IPAddressFamily_copyfunc_type(sk_IPAddressFamily_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_IPAddressFamily_freefunc_type(sk_IPAddressFamily_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27385 # 1237 "include/openssl/x509v3.h"
27386 typedef struct stack_st_IPAddressFamily IPAddrBlocks;
27387
27388 extern IPAddressRange *IPAddressRange_new(void); extern void IPAddressRange_free(IPAddressRange *a); extern IPAddressRange *d2i_IPAddressRange(IPAddressRange **a, const unsigned char **in, long len); extern int i2d_IPAddressRange(const IPAddressRange *a, unsigned char **out); extern const ASN1_ITEM * IPAddressRange_it(void);
27389 extern IPAddressOrRange *IPAddressOrRange_new(void); extern void IPAddressOrRange_free(IPAddressOrRange *a); extern IPAddressOrRange *d2i_IPAddressOrRange(IPAddressOrRange **a, const unsigned char **in, long len); extern int i2d_IPAddressOrRange(const IPAddressOrRange *a, unsigned char **out); extern const ASN1_ITEM * IPAddressOrRange_it(void);
27390 extern IPAddressChoice *IPAddressChoice_new(void); extern void IPAddressChoice_free(IPAddressChoice *a); extern IPAddressChoice *d2i_IPAddressChoice(IPAddressChoice **a, const unsigned char **in, long len); extern int i2d_IPAddressChoice(const IPAddressChoice *a, unsigned char **out); extern const ASN1_ITEM * IPAddressChoice_it(void);
27391 extern IPAddressFamily *IPAddressFamily_new(void); extern void IPAddressFamily_free(IPAddressFamily *a); extern IPAddressFamily *d2i_IPAddressFamily(IPAddressFamily **a, const unsigned char **in, long len); extern int i2d_IPAddressFamily(const IPAddressFamily *a, unsigned char **out); extern const ASN1_ITEM * IPAddressFamily_it(void);
27392 # 1264 "include/openssl/x509v3.h"
27393 int X509v3_asid_add_inherit(ASIdentifiers *asid, int which);
27394 int X509v3_asid_add_id_or_range(ASIdentifiers *asid, int which,
27395 ASN1_INTEGER *min, ASN1_INTEGER *max);
27396 int X509v3_addr_add_inherit(IPAddrBlocks *addr,
27397 const unsigned afi, const unsigned *safi);
27398 int X509v3_addr_add_prefix(IPAddrBlocks *addr,
27399 const unsigned afi, const unsigned *safi,
27400 unsigned char *a, const int prefixlen);
27401 int X509v3_addr_add_range(IPAddrBlocks *addr,
27402 const unsigned afi, const unsigned *safi,
27403 unsigned char *min, unsigned char *max);
27404 unsigned X509v3_addr_get_afi(const IPAddressFamily *f);
27405 int X509v3_addr_get_range(IPAddressOrRange *aor, const unsigned afi,
27406 unsigned char *min, unsigned char *max,
27407 const int length);
27408
27409
27410
27411
27412 int X509v3_asid_is_canonical(ASIdentifiers *asid);
27413 int X509v3_addr_is_canonical(IPAddrBlocks *addr);
27414 int X509v3_asid_canonize(ASIdentifiers *asid);
27415 int X509v3_addr_canonize(IPAddrBlocks *addr);
27416
27417
27418
27419
27420 int X509v3_asid_inherits(ASIdentifiers *asid);
27421 int X509v3_addr_inherits(IPAddrBlocks *addr);
27422 int X509v3_asid_subset(ASIdentifiers *a, ASIdentifiers *b);
27423 int X509v3_addr_subset(IPAddrBlocks *a, IPAddrBlocks *b);
27424
27425
27426
27427
27428 int X509v3_asid_validate_path(X509_STORE_CTX *);
27429 int X509v3_addr_validate_path(X509_STORE_CTX *);
27430 int X509v3_asid_validate_resource_set(struct stack_st_X509 *chain,
27431 ASIdentifiers *ext,
27432 int allow_inheritance);
27433 int X509v3_addr_validate_resource_set(struct stack_st_X509 *chain,
27434 IPAddrBlocks *ext, int allow_inheritance);
27435
27436
27437
27438 struct stack_st_ASN1_STRING; typedef int (*sk_ASN1_STRING_compfunc)(const ASN1_STRING * const *a, const ASN1_STRING *const *b); typedef void (*sk_ASN1_STRING_freefunc)(ASN1_STRING *a); typedef ASN1_STRING * (*sk_ASN1_STRING_copyfunc)(const ASN1_STRING *a); static __attribute__((unused)) inline ASN1_STRING *ossl_check_ASN1_STRING_type(ASN1_STRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASN1_STRING_sk_type(const struct stack_st_ASN1_STRING *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASN1_STRING_sk_type(struct stack_st_ASN1_STRING *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASN1_STRING_compfunc_type(sk_ASN1_STRING_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASN1_STRING_copyfunc_type(sk_ASN1_STRING_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASN1_STRING_freefunc_type(sk_ASN1_STRING_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27439 # 1340 "include/openssl/x509v3.h"
27440 typedef struct NamingAuthority_st NAMING_AUTHORITY;
27441 typedef struct ProfessionInfo_st PROFESSION_INFO;
27442 typedef struct Admissions_st ADMISSIONS;
27443 typedef struct AdmissionSyntax_st ADMISSION_SYNTAX;
27444 extern NAMING_AUTHORITY *NAMING_AUTHORITY_new(void); extern void NAMING_AUTHORITY_free(NAMING_AUTHORITY *a); extern NAMING_AUTHORITY *d2i_NAMING_AUTHORITY(NAMING_AUTHORITY **a, const unsigned char **in, long len); extern int i2d_NAMING_AUTHORITY(const NAMING_AUTHORITY *a, unsigned char **out); extern const ASN1_ITEM * NAMING_AUTHORITY_it(void);
27445 extern PROFESSION_INFO *PROFESSION_INFO_new(void); extern void PROFESSION_INFO_free(PROFESSION_INFO *a); extern PROFESSION_INFO *d2i_PROFESSION_INFO(PROFESSION_INFO **a, const unsigned char **in, long len); extern int i2d_PROFESSION_INFO(const PROFESSION_INFO *a, unsigned char **out); extern const ASN1_ITEM * PROFESSION_INFO_it(void);
27446 extern ADMISSIONS *ADMISSIONS_new(void); extern void ADMISSIONS_free(ADMISSIONS *a); extern ADMISSIONS *d2i_ADMISSIONS(ADMISSIONS **a, const unsigned char **in, long len); extern int i2d_ADMISSIONS(const ADMISSIONS *a, unsigned char **out); extern const ASN1_ITEM * ADMISSIONS_it(void);
27447 extern ADMISSION_SYNTAX *ADMISSION_SYNTAX_new(void); extern void ADMISSION_SYNTAX_free(ADMISSION_SYNTAX *a); extern ADMISSION_SYNTAX *d2i_ADMISSION_SYNTAX(ADMISSION_SYNTAX **a, const unsigned char **in, long len); extern int i2d_ADMISSION_SYNTAX(const ADMISSION_SYNTAX *a, unsigned char **out); extern const ASN1_ITEM * ADMISSION_SYNTAX_it(void);
27448 struct stack_st_PROFESSION_INFO; typedef int (*sk_PROFESSION_INFO_compfunc)(const PROFESSION_INFO * const *a, const PROFESSION_INFO *const *b); typedef void (*sk_PROFESSION_INFO_freefunc)(PROFESSION_INFO *a); typedef PROFESSION_INFO * (*sk_PROFESSION_INFO_copyfunc)(const PROFESSION_INFO *a); static __attribute__((unused)) inline PROFESSION_INFO *ossl_check_PROFESSION_INFO_type(PROFESSION_INFO *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_PROFESSION_INFO_sk_type(const struct stack_st_PROFESSION_INFO *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_PROFESSION_INFO_sk_type(struct stack_st_PROFESSION_INFO *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_PROFESSION_INFO_compfunc_type(sk_PROFESSION_INFO_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_PROFESSION_INFO_copyfunc_type(sk_PROFESSION_INFO_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_PROFESSION_INFO_freefunc_type(sk_PROFESSION_INFO_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27449 # 1374 "include/openssl/x509v3.h"
27450 struct stack_st_ADMISSIONS; typedef int (*sk_ADMISSIONS_compfunc)(const ADMISSIONS * const *a, const ADMISSIONS *const *b); typedef void (*sk_ADMISSIONS_freefunc)(ADMISSIONS *a); typedef ADMISSIONS * (*sk_ADMISSIONS_copyfunc)(const ADMISSIONS *a); static __attribute__((unused)) inline ADMISSIONS *ossl_check_ADMISSIONS_type(ADMISSIONS *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ADMISSIONS_sk_type(const struct stack_st_ADMISSIONS *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ADMISSIONS_sk_type(struct stack_st_ADMISSIONS *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ADMISSIONS_compfunc_type(sk_ADMISSIONS_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ADMISSIONS_copyfunc_type(sk_ADMISSIONS_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ADMISSIONS_freefunc_type(sk_ADMISSIONS_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27451 # 1401 "include/openssl/x509v3.h"
27452 typedef struct stack_st_PROFESSION_INFO PROFESSION_INFOS;
27453
27454 const ASN1_OBJECT *NAMING_AUTHORITY_get0_authorityId(
27455 const NAMING_AUTHORITY *n);
27456 const ASN1_IA5STRING *NAMING_AUTHORITY_get0_authorityURL(
27457 const NAMING_AUTHORITY *n);
27458 const ASN1_STRING *NAMING_AUTHORITY_get0_authorityText(
27459 const NAMING_AUTHORITY *n);
27460 void NAMING_AUTHORITY_set0_authorityId(NAMING_AUTHORITY *n,
27461 ASN1_OBJECT* namingAuthorityId);
27462 void NAMING_AUTHORITY_set0_authorityURL(NAMING_AUTHORITY *n,
27463 ASN1_IA5STRING* namingAuthorityUrl);
27464 void NAMING_AUTHORITY_set0_authorityText(NAMING_AUTHORITY *n,
27465 ASN1_STRING* namingAuthorityText);
27466
27467 const GENERAL_NAME *ADMISSION_SYNTAX_get0_admissionAuthority(
27468 const ADMISSION_SYNTAX *as);
27469 void ADMISSION_SYNTAX_set0_admissionAuthority(
27470 ADMISSION_SYNTAX *as, GENERAL_NAME *aa);
27471 const struct stack_st_ADMISSIONS *ADMISSION_SYNTAX_get0_contentsOfAdmissions(
27472 const ADMISSION_SYNTAX *as);
27473 void ADMISSION_SYNTAX_set0_contentsOfAdmissions(
27474 ADMISSION_SYNTAX *as, struct stack_st_ADMISSIONS *a);
27475 const GENERAL_NAME *ADMISSIONS_get0_admissionAuthority(const ADMISSIONS *a);
27476 void ADMISSIONS_set0_admissionAuthority(ADMISSIONS *a, GENERAL_NAME *aa);
27477 const NAMING_AUTHORITY *ADMISSIONS_get0_namingAuthority(const ADMISSIONS *a);
27478 void ADMISSIONS_set0_namingAuthority(ADMISSIONS *a, NAMING_AUTHORITY *na);
27479 const PROFESSION_INFOS *ADMISSIONS_get0_professionInfos(const ADMISSIONS *a);
27480 void ADMISSIONS_set0_professionInfos(ADMISSIONS *a, PROFESSION_INFOS *pi);
27481 const ASN1_OCTET_STRING *PROFESSION_INFO_get0_addProfessionInfo(
27482 const PROFESSION_INFO *pi);
27483 void PROFESSION_INFO_set0_addProfessionInfo(
27484 PROFESSION_INFO *pi, ASN1_OCTET_STRING *aos);
27485 const NAMING_AUTHORITY *PROFESSION_INFO_get0_namingAuthority(
27486 const PROFESSION_INFO *pi);
27487 void PROFESSION_INFO_set0_namingAuthority(
27488 PROFESSION_INFO *pi, NAMING_AUTHORITY *na);
27489 const struct stack_st_ASN1_STRING *PROFESSION_INFO_get0_professionItems(
27490 const PROFESSION_INFO *pi);
27491 void PROFESSION_INFO_set0_professionItems(
27492 PROFESSION_INFO *pi, struct stack_st_ASN1_STRING *as);
27493 const struct stack_st_ASN1_OBJECT *PROFESSION_INFO_get0_professionOIDs(
27494 const PROFESSION_INFO *pi);
27495 void PROFESSION_INFO_set0_professionOIDs(
27496 PROFESSION_INFO *pi, struct stack_st_ASN1_OBJECT *po);
27497 const ASN1_PRINTABLESTRING *PROFESSION_INFO_get0_registrationNumber(
27498 const PROFESSION_INFO *pi);
27499 void PROFESSION_INFO_set0_registrationNumber(
27500 PROFESSION_INFO *pi, ASN1_PRINTABLESTRING *rn);
27501 # 17 "ssl/ssl_lib.c" 2
27502 # 1 "include/openssl/rand.h" 1
27503 # 12 "include/openssl/rand.h"
27504
27505
27506
27507
27508
27509
27510
27511
27512 # 1 "include/openssl/types.h" 1
27513 # 21 "include/openssl/rand.h" 2
27514
27515 # 1 "include/openssl/randerr.h" 1
27516 # 13 "include/openssl/randerr.h"
27517
27518 # 23 "include/openssl/rand.h" 2
27519 # 40 "include/openssl/rand.h"
27520 struct rand_meth_st {
27521 int (*seed) (const void *buf, int num);
27522 int (*bytes) (unsigned char *buf, int num);
27523 void (*cleanup) (void);
27524 int (*add) (const void *buf, int num, double randomness);
27525 int (*pseudorand) (unsigned char *buf, int num);
27526 int (*status) (void);
27527 };
27528
27529 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RAND_set_rand_method(const RAND_METHOD *meth);
27530 __attribute__((deprecated("Since OpenSSL " "3.0"))) const RAND_METHOD *RAND_get_rand_method(void);
27531
27532 __attribute__((deprecated("Since OpenSSL " "3.0"))) int RAND_set_rand_engine(ENGINE *engine);
27533
27534
27535 __attribute__((deprecated("Since OpenSSL " "3.0"))) RAND_METHOD *RAND_OpenSSL(void);
27536
27537
27538
27539
27540
27541 int RAND_bytes(unsigned char *buf, int num);
27542 int RAND_priv_bytes(unsigned char *buf, int num);
27543
27544
27545
27546
27547
27548 int RAND_priv_bytes_ex(OSSL_LIB_CTX *ctx, unsigned char *buf, size_t num,
27549 unsigned int strength);
27550
27551
27552
27553
27554
27555 int RAND_bytes_ex(OSSL_LIB_CTX *ctx, unsigned char *buf, size_t num,
27556 unsigned int strength);
27557
27558
27559 __attribute__((deprecated("Since OpenSSL " "1.1.0"))) int RAND_pseudo_bytes(unsigned char *buf, int num);
27560
27561
27562 EVP_RAND_CTX *RAND_get0_primary(OSSL_LIB_CTX *ctx);
27563 EVP_RAND_CTX *RAND_get0_public(OSSL_LIB_CTX *ctx);
27564 EVP_RAND_CTX *RAND_get0_private(OSSL_LIB_CTX *ctx);
27565 int RAND_set0_public(OSSL_LIB_CTX *ctx, EVP_RAND_CTX *rand);
27566 int RAND_set0_private(OSSL_LIB_CTX *ctx, EVP_RAND_CTX *rand);
27567
27568 int RAND_set_DRBG_type(OSSL_LIB_CTX *ctx, const char *drbg, const char *propq,
27569 const char *cipher, const char *digest);
27570 int RAND_set_seed_source_type(OSSL_LIB_CTX *ctx, const char *seed,
27571 const char *propq);
27572
27573 void RAND_seed(const void *buf, int num);
27574 void RAND_keep_random_devices_open(int keep);
27575
27576
27577
27578
27579 void RAND_add(const void *buf, int num, double randomness);
27580 int RAND_load_file(const char *file, long max_bytes);
27581 int RAND_write_file(const char *file);
27582 const char *RAND_file_name(char *file, size_t num);
27583 int RAND_status(void);
27584
27585
27586
27587
27588
27589
27590
27591 int RAND_poll(void);
27592 # 18 "ssl/ssl_lib.c" 2
27593 # 1 "include/openssl/ocsp.h" 1
27594 # 17 "include/openssl/ocsp.h"
27595
27596 # 65 "include/openssl/ocsp.h"
27597 # 1 "include/openssl/ocsperr.h" 1
27598 # 13 "include/openssl/ocsperr.h"
27599
27600 # 66 "include/openssl/ocsp.h" 2
27601 # 89 "include/openssl/ocsp.h"
27602 typedef struct ocsp_cert_id_st OCSP_CERTID;
27603 typedef struct ocsp_one_request_st OCSP_ONEREQ;
27604 typedef struct ocsp_req_info_st OCSP_REQINFO;
27605 typedef struct ocsp_signature_st OCSP_SIGNATURE;
27606 typedef struct ocsp_request_st OCSP_REQUEST;
27607
27608 struct stack_st_OCSP_CERTID; typedef int (*sk_OCSP_CERTID_compfunc)(const OCSP_CERTID * const *a, const OCSP_CERTID *const *b); typedef void (*sk_OCSP_CERTID_freefunc)(OCSP_CERTID *a); typedef OCSP_CERTID * (*sk_OCSP_CERTID_copyfunc)(const OCSP_CERTID *a); static __attribute__((unused)) inline OCSP_CERTID *ossl_check_OCSP_CERTID_type(OCSP_CERTID *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_OCSP_CERTID_sk_type(const struct stack_st_OCSP_CERTID *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_OCSP_CERTID_sk_type(struct stack_st_OCSP_CERTID *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_OCSP_CERTID_compfunc_type(sk_OCSP_CERTID_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_OCSP_CERTID_copyfunc_type(sk_OCSP_CERTID_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_OCSP_CERTID_freefunc_type(sk_OCSP_CERTID_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27609 # 121 "include/openssl/ocsp.h"
27610 struct stack_st_OCSP_ONEREQ; typedef int (*sk_OCSP_ONEREQ_compfunc)(const OCSP_ONEREQ * const *a, const OCSP_ONEREQ *const *b); typedef void (*sk_OCSP_ONEREQ_freefunc)(OCSP_ONEREQ *a); typedef OCSP_ONEREQ * (*sk_OCSP_ONEREQ_copyfunc)(const OCSP_ONEREQ *a); static __attribute__((unused)) inline OCSP_ONEREQ *ossl_check_OCSP_ONEREQ_type(OCSP_ONEREQ *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_OCSP_ONEREQ_sk_type(const struct stack_st_OCSP_ONEREQ *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_OCSP_ONEREQ_sk_type(struct stack_st_OCSP_ONEREQ *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_OCSP_ONEREQ_compfunc_type(sk_OCSP_ONEREQ_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_OCSP_ONEREQ_copyfunc_type(sk_OCSP_ONEREQ_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_OCSP_ONEREQ_freefunc_type(sk_OCSP_ONEREQ_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27611 # 156 "include/openssl/ocsp.h"
27612 typedef struct ocsp_resp_bytes_st OCSP_RESPBYTES;
27613
27614
27615
27616
27617 struct stack_st_OCSP_RESPID; typedef int (*sk_OCSP_RESPID_compfunc)(const OCSP_RESPID * const *a, const OCSP_RESPID *const *b); typedef void (*sk_OCSP_RESPID_freefunc)(OCSP_RESPID *a); typedef OCSP_RESPID * (*sk_OCSP_RESPID_copyfunc)(const OCSP_RESPID *a); static __attribute__((unused)) inline OCSP_RESPID *ossl_check_OCSP_RESPID_type(OCSP_RESPID *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_OCSP_RESPID_sk_type(const struct stack_st_OCSP_RESPID *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_OCSP_RESPID_sk_type(struct stack_st_OCSP_RESPID *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_OCSP_RESPID_compfunc_type(sk_OCSP_RESPID_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_OCSP_RESPID_copyfunc_type(sk_OCSP_RESPID_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_OCSP_RESPID_freefunc_type(sk_OCSP_RESPID_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27618 # 189 "include/openssl/ocsp.h"
27619 typedef struct ocsp_revoked_info_st OCSP_REVOKEDINFO;
27620
27621
27622
27623
27624
27625 typedef struct ocsp_cert_status_st OCSP_CERTSTATUS;
27626 typedef struct ocsp_single_response_st OCSP_SINGLERESP;
27627
27628 struct stack_st_OCSP_SINGLERESP; typedef int (*sk_OCSP_SINGLERESP_compfunc)(const OCSP_SINGLERESP * const *a, const OCSP_SINGLERESP *const *b); typedef void (*sk_OCSP_SINGLERESP_freefunc)(OCSP_SINGLERESP *a); typedef OCSP_SINGLERESP * (*sk_OCSP_SINGLERESP_copyfunc)(const OCSP_SINGLERESP *a); static __attribute__((unused)) inline OCSP_SINGLERESP *ossl_check_OCSP_SINGLERESP_type(OCSP_SINGLERESP *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_OCSP_SINGLERESP_sk_type(const struct stack_st_OCSP_SINGLERESP *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_OCSP_SINGLERESP_sk_type(struct stack_st_OCSP_SINGLERESP *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_OCSP_SINGLERESP_compfunc_type(sk_OCSP_SINGLERESP_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_OCSP_SINGLERESP_copyfunc_type(sk_OCSP_SINGLERESP_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_OCSP_SINGLERESP_freefunc_type(sk_OCSP_SINGLERESP_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27629 # 226 "include/openssl/ocsp.h"
27630 typedef struct ocsp_response_data_st OCSP_RESPDATA;
27631
27632 typedef struct ocsp_basic_response_st OCSP_BASICRESP;
27633
27634 typedef struct ocsp_crl_id_st OCSP_CRLID;
27635 typedef struct ocsp_service_locator_st OCSP_SERVICELOC;
27636 # 267 "include/openssl/ocsp.h"
27637 extern OCSP_CERTID *OCSP_CERTID_dup(const OCSP_CERTID *a);
27638
27639 OSSL_HTTP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path,
27640 const OCSP_REQUEST *req, int buf_size);
27641 OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req);
27642
27643
27644 typedef OSSL_HTTP_REQ_CTX OCSP_REQ_CTX;
27645 # 296 "include/openssl/ocsp.h"
27646 OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, const X509 *subject,
27647 const X509 *issuer);
27648
27649 OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst,
27650 const X509_NAME *issuerName,
27651 const ASN1_BIT_STRING *issuerKey,
27652 const ASN1_INTEGER *serialNumber);
27653
27654 OCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid);
27655
27656 int OCSP_request_add1_nonce(OCSP_REQUEST *req, unsigned char *val, int len);
27657 int OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len);
27658 int OCSP_check_nonce(OCSP_REQUEST *req, OCSP_BASICRESP *bs);
27659 int OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req);
27660
27661 int OCSP_request_set1_name(OCSP_REQUEST *req, const X509_NAME *nm);
27662 int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert);
27663
27664 int OCSP_request_sign(OCSP_REQUEST *req,
27665 X509 *signer,
27666 EVP_PKEY *key,
27667 const EVP_MD *dgst,
27668 struct stack_st_X509 *certs, unsigned long flags);
27669
27670 int OCSP_response_status(OCSP_RESPONSE *resp);
27671 OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp);
27672
27673 const ASN1_OCTET_STRING *OCSP_resp_get0_signature(const OCSP_BASICRESP *bs);
27674 const X509_ALGOR *OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs);
27675 const OCSP_RESPDATA *OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs);
27676 int OCSP_resp_get0_signer(OCSP_BASICRESP *bs, X509 **signer,
27677 struct stack_st_X509 *extra_certs);
27678
27679 int OCSP_resp_count(OCSP_BASICRESP *bs);
27680 OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx);
27681 const ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(const OCSP_BASICRESP* bs);
27682 const struct stack_st_X509 *OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
27683 int OCSP_resp_get0_id(const OCSP_BASICRESP *bs,
27684 const ASN1_OCTET_STRING **pid,
27685 const X509_NAME **pname);
27686 int OCSP_resp_get1_id(const OCSP_BASICRESP *bs,
27687 ASN1_OCTET_STRING **pid,
27688 X509_NAME **pname);
27689
27690 int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last);
27691 int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason,
27692 ASN1_GENERALIZEDTIME **revtime,
27693 ASN1_GENERALIZEDTIME **thisupd,
27694 ASN1_GENERALIZEDTIME **nextupd);
27695 int OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status,
27696 int *reason,
27697 ASN1_GENERALIZEDTIME **revtime,
27698 ASN1_GENERALIZEDTIME **thisupd,
27699 ASN1_GENERALIZEDTIME **nextupd);
27700 int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd,
27701 ASN1_GENERALIZEDTIME *nextupd, long sec, long maxsec);
27702
27703 int OCSP_request_verify(OCSP_REQUEST *req, struct stack_st_X509 *certs,
27704 X509_STORE *store, unsigned long flags);
27705
27706
27707
27708
27709 int OCSP_id_issuer_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b);
27710 int OCSP_id_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b);
27711
27712 int OCSP_request_onereq_count(OCSP_REQUEST *req);
27713 OCSP_ONEREQ *OCSP_request_onereq_get0(OCSP_REQUEST *req, int i);
27714 OCSP_CERTID *OCSP_onereq_get0_id(OCSP_ONEREQ *one);
27715 int OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd,
27716 ASN1_OCTET_STRING **pikeyHash,
27717 ASN1_INTEGER **pserial, OCSP_CERTID *cid);
27718 int OCSP_request_is_signed(OCSP_REQUEST *req);
27719 OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs);
27720 OCSP_SINGLERESP *OCSP_basic_add1_status(OCSP_BASICRESP *rsp,
27721 OCSP_CERTID *cid,
27722 int status, int reason,
27723 ASN1_TIME *revtime,
27724 ASN1_TIME *thisupd,
27725 ASN1_TIME *nextupd);
27726 int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert);
27727 int OCSP_basic_sign(OCSP_BASICRESP *brsp,
27728 X509 *signer, EVP_PKEY *key, const EVP_MD *dgst,
27729 struct stack_st_X509 *certs, unsigned long flags);
27730 int OCSP_basic_sign_ctx(OCSP_BASICRESP *brsp,
27731 X509 *signer, EVP_MD_CTX *ctx,
27732 struct stack_st_X509 *certs, unsigned long flags);
27733 int OCSP_RESPID_set_by_name(OCSP_RESPID *respid, X509 *cert);
27734 int OCSP_RESPID_set_by_key_ex(OCSP_RESPID *respid, X509 *cert,
27735 OSSL_LIB_CTX *libctx, const char *propq);
27736 int OCSP_RESPID_set_by_key(OCSP_RESPID *respid, X509 *cert);
27737 int OCSP_RESPID_match_ex(OCSP_RESPID *respid, X509 *cert, OSSL_LIB_CTX *libctx,
27738 const char *propq);
27739 int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert);
27740
27741 X509_EXTENSION *OCSP_crlID_new(const char *url, long *n, char *tim);
27742
27743 X509_EXTENSION *OCSP_accept_responses_new(char **oids);
27744
27745 X509_EXTENSION *OCSP_archive_cutoff_new(char *tim);
27746
27747 X509_EXTENSION *OCSP_url_svcloc_new(const X509_NAME *issuer, const char **urls);
27748
27749 int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x);
27750 int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos);
27751 int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, const ASN1_OBJECT *obj,
27752 int lastpos);
27753 int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos);
27754 X509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc);
27755 X509_EXTENSION *OCSP_REQUEST_delete_ext(OCSP_REQUEST *x, int loc);
27756 void *OCSP_REQUEST_get1_ext_d2i(OCSP_REQUEST *x, int nid, int *crit,
27757 int *idx);
27758 int OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit,
27759 unsigned long flags);
27760 int OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc);
27761
27762 int OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x);
27763 int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos);
27764 int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, const ASN1_OBJECT *obj, int lastpos);
27765 int OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos);
27766 X509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc);
27767 X509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc);
27768 void *OCSP_ONEREQ_get1_ext_d2i(OCSP_ONEREQ *x, int nid, int *crit, int *idx);
27769 int OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit,
27770 unsigned long flags);
27771 int OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc);
27772
27773 int OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x);
27774 int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos);
27775 int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, const ASN1_OBJECT *obj,
27776 int lastpos);
27777 int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit,
27778 int lastpos);
27779 X509_EXTENSION *OCSP_BASICRESP_get_ext(OCSP_BASICRESP *x, int loc);
27780 X509_EXTENSION *OCSP_BASICRESP_delete_ext(OCSP_BASICRESP *x, int loc);
27781 void *OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit,
27782 int *idx);
27783 int OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value,
27784 int crit, unsigned long flags);
27785 int OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc);
27786
27787 int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x);
27788 int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos);
27789 int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, const ASN1_OBJECT *obj,
27790 int lastpos);
27791 int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit,
27792 int lastpos);
27793 X509_EXTENSION *OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *x, int loc);
27794 X509_EXTENSION *OCSP_SINGLERESP_delete_ext(OCSP_SINGLERESP *x, int loc);
27795 void *OCSP_SINGLERESP_get1_ext_d2i(OCSP_SINGLERESP *x, int nid, int *crit,
27796 int *idx);
27797 int OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value,
27798 int crit, unsigned long flags);
27799 int OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc);
27800 const OCSP_CERTID *OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *x);
27801
27802 extern OCSP_SINGLERESP *OCSP_SINGLERESP_new(void); extern void OCSP_SINGLERESP_free(OCSP_SINGLERESP *a); extern OCSP_SINGLERESP *d2i_OCSP_SINGLERESP(OCSP_SINGLERESP **a, const unsigned char **in, long len); extern int i2d_OCSP_SINGLERESP(const OCSP_SINGLERESP *a, unsigned char **out); extern const ASN1_ITEM * OCSP_SINGLERESP_it(void);
27803 extern OCSP_CERTSTATUS *OCSP_CERTSTATUS_new(void); extern void OCSP_CERTSTATUS_free(OCSP_CERTSTATUS *a); extern OCSP_CERTSTATUS *d2i_OCSP_CERTSTATUS(OCSP_CERTSTATUS **a, const unsigned char **in, long len); extern int i2d_OCSP_CERTSTATUS(const OCSP_CERTSTATUS *a, unsigned char **out); extern const ASN1_ITEM * OCSP_CERTSTATUS_it(void);
27804 extern OCSP_REVOKEDINFO *OCSP_REVOKEDINFO_new(void); extern void OCSP_REVOKEDINFO_free(OCSP_REVOKEDINFO *a); extern OCSP_REVOKEDINFO *d2i_OCSP_REVOKEDINFO(OCSP_REVOKEDINFO **a, const unsigned char **in, long len); extern int i2d_OCSP_REVOKEDINFO(const OCSP_REVOKEDINFO *a, unsigned char **out); extern const ASN1_ITEM * OCSP_REVOKEDINFO_it(void);
27805 extern OCSP_BASICRESP *OCSP_BASICRESP_new(void); extern void OCSP_BASICRESP_free(OCSP_BASICRESP *a); extern OCSP_BASICRESP *d2i_OCSP_BASICRESP(OCSP_BASICRESP **a, const unsigned char **in, long len); extern int i2d_OCSP_BASICRESP(const OCSP_BASICRESP *a, unsigned char **out); extern const ASN1_ITEM * OCSP_BASICRESP_it(void);
27806 extern OCSP_RESPDATA *OCSP_RESPDATA_new(void); extern void OCSP_RESPDATA_free(OCSP_RESPDATA *a); extern OCSP_RESPDATA *d2i_OCSP_RESPDATA(OCSP_RESPDATA **a, const unsigned char **in, long len); extern int i2d_OCSP_RESPDATA(const OCSP_RESPDATA *a, unsigned char **out); extern const ASN1_ITEM * OCSP_RESPDATA_it(void);
27807 extern OCSP_RESPID *OCSP_RESPID_new(void); extern void OCSP_RESPID_free(OCSP_RESPID *a); extern OCSP_RESPID *d2i_OCSP_RESPID(OCSP_RESPID **a, const unsigned char **in, long len); extern int i2d_OCSP_RESPID(const OCSP_RESPID *a, unsigned char **out); extern const ASN1_ITEM * OCSP_RESPID_it(void);
27808 extern OCSP_RESPONSE *OCSP_RESPONSE_new(void); extern void OCSP_RESPONSE_free(OCSP_RESPONSE *a); extern OCSP_RESPONSE *d2i_OCSP_RESPONSE(OCSP_RESPONSE **a, const unsigned char **in, long len); extern int i2d_OCSP_RESPONSE(const OCSP_RESPONSE *a, unsigned char **out); extern const ASN1_ITEM * OCSP_RESPONSE_it(void);
27809 extern OCSP_RESPBYTES *OCSP_RESPBYTES_new(void); extern void OCSP_RESPBYTES_free(OCSP_RESPBYTES *a); extern OCSP_RESPBYTES *d2i_OCSP_RESPBYTES(OCSP_RESPBYTES **a, const unsigned char **in, long len); extern int i2d_OCSP_RESPBYTES(const OCSP_RESPBYTES *a, unsigned char **out); extern const ASN1_ITEM * OCSP_RESPBYTES_it(void);
27810 extern OCSP_ONEREQ *OCSP_ONEREQ_new(void); extern void OCSP_ONEREQ_free(OCSP_ONEREQ *a); extern OCSP_ONEREQ *d2i_OCSP_ONEREQ(OCSP_ONEREQ **a, const unsigned char **in, long len); extern int i2d_OCSP_ONEREQ(const OCSP_ONEREQ *a, unsigned char **out); extern const ASN1_ITEM * OCSP_ONEREQ_it(void);
27811 extern OCSP_CERTID *OCSP_CERTID_new(void); extern void OCSP_CERTID_free(OCSP_CERTID *a); extern OCSP_CERTID *d2i_OCSP_CERTID(OCSP_CERTID **a, const unsigned char **in, long len); extern int i2d_OCSP_CERTID(const OCSP_CERTID *a, unsigned char **out); extern const ASN1_ITEM * OCSP_CERTID_it(void);
27812 extern OCSP_REQUEST *OCSP_REQUEST_new(void); extern void OCSP_REQUEST_free(OCSP_REQUEST *a); extern OCSP_REQUEST *d2i_OCSP_REQUEST(OCSP_REQUEST **a, const unsigned char **in, long len); extern int i2d_OCSP_REQUEST(const OCSP_REQUEST *a, unsigned char **out); extern const ASN1_ITEM * OCSP_REQUEST_it(void);
27813 extern OCSP_SIGNATURE *OCSP_SIGNATURE_new(void); extern void OCSP_SIGNATURE_free(OCSP_SIGNATURE *a); extern OCSP_SIGNATURE *d2i_OCSP_SIGNATURE(OCSP_SIGNATURE **a, const unsigned char **in, long len); extern int i2d_OCSP_SIGNATURE(const OCSP_SIGNATURE *a, unsigned char **out); extern const ASN1_ITEM * OCSP_SIGNATURE_it(void);
27814 extern OCSP_REQINFO *OCSP_REQINFO_new(void); extern void OCSP_REQINFO_free(OCSP_REQINFO *a); extern OCSP_REQINFO *d2i_OCSP_REQINFO(OCSP_REQINFO **a, const unsigned char **in, long len); extern int i2d_OCSP_REQINFO(const OCSP_REQINFO *a, unsigned char **out); extern const ASN1_ITEM * OCSP_REQINFO_it(void);
27815 extern OCSP_CRLID *OCSP_CRLID_new(void); extern void OCSP_CRLID_free(OCSP_CRLID *a); extern OCSP_CRLID *d2i_OCSP_CRLID(OCSP_CRLID **a, const unsigned char **in, long len); extern int i2d_OCSP_CRLID(const OCSP_CRLID *a, unsigned char **out); extern const ASN1_ITEM * OCSP_CRLID_it(void);
27816 extern OCSP_SERVICELOC *OCSP_SERVICELOC_new(void); extern void OCSP_SERVICELOC_free(OCSP_SERVICELOC *a); extern OCSP_SERVICELOC *d2i_OCSP_SERVICELOC(OCSP_SERVICELOC **a, const unsigned char **in, long len); extern int i2d_OCSP_SERVICELOC(const OCSP_SERVICELOC *a, unsigned char **out); extern const ASN1_ITEM * OCSP_SERVICELOC_it(void);
27817
27818 const char *OCSP_response_status_str(long s);
27819 const char *OCSP_cert_status_str(long s);
27820 const char *OCSP_crl_reason_str(long s);
27821
27822 int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *a, unsigned long flags);
27823 int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE *o, unsigned long flags);
27824
27825 int OCSP_basic_verify(OCSP_BASICRESP *bs, struct stack_st_X509 *certs,
27826 X509_STORE *st, unsigned long flags);
27827 # 19 "ssl/ssl_lib.c" 2
27828
27829 # 1 "include/openssl/engine.h" 1
27830 # 13 "include/openssl/engine.h"
27831
27832 # 30 "include/openssl/engine.h"
27833 # 1 "include/openssl/ui.h" 1
27834 # 17 "include/openssl/ui.h"
27835
27836 # 31 "include/openssl/ui.h"
27837 # 1 "include/openssl/types.h" 1
27838 # 32 "include/openssl/ui.h" 2
27839 # 1 "include/openssl/uierr.h" 1
27840 # 13 "include/openssl/uierr.h"
27841
27842 # 33 "include/openssl/ui.h" 2
27843 # 53 "include/openssl/ui.h"
27844 UI *UI_new(void);
27845 UI *UI_new_method(const UI_METHOD *method);
27846 void UI_free(UI *ui);
27847 # 100 "include/openssl/ui.h"
27848 int UI_add_input_string(UI *ui, const char *prompt, int flags,
27849 char *result_buf, int minsize, int maxsize);
27850 int UI_dup_input_string(UI *ui, const char *prompt, int flags,
27851 char *result_buf, int minsize, int maxsize);
27852 int UI_add_verify_string(UI *ui, const char *prompt, int flags,
27853 char *result_buf, int minsize, int maxsize,
27854 const char *test_buf);
27855 int UI_dup_verify_string(UI *ui, const char *prompt, int flags,
27856 char *result_buf, int minsize, int maxsize,
27857 const char *test_buf);
27858 int UI_add_input_boolean(UI *ui, const char *prompt, const char *action_desc,
27859 const char *ok_chars, const char *cancel_chars,
27860 int flags, char *result_buf);
27861 int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc,
27862 const char *ok_chars, const char *cancel_chars,
27863 int flags, char *result_buf);
27864 int UI_add_info_string(UI *ui, const char *text);
27865 int UI_dup_info_string(UI *ui, const char *text);
27866 int UI_add_error_string(UI *ui, const char *text);
27867 int UI_dup_error_string(UI *ui, const char *text);
27868 # 164 "include/openssl/ui.h"
27869 char *UI_construct_prompt(UI *ui_method,
27870 const char *phrase_desc, const char *object_name);
27871 # 178 "include/openssl/ui.h"
27872 void *UI_add_user_data(UI *ui, void *user_data);
27873
27874
27875
27876
27877
27878 int UI_dup_user_data(UI *ui, void *user_data);
27879
27880 void *UI_get0_user_data(UI *ui);
27881
27882
27883 const char *UI_get0_result(UI *ui, int i);
27884 int UI_get_result_length(UI *ui, int i);
27885
27886
27887 int UI_process(UI *ui);
27888
27889
27890
27891
27892
27893
27894 int UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void));
27895 # 222 "include/openssl/ui.h"
27896 int UI_set_ex_data(UI *r, int idx, void *arg);
27897 void *UI_get_ex_data(const UI *r, int idx);
27898
27899
27900 void UI_set_default_method(const UI_METHOD *meth);
27901 const UI_METHOD *UI_get_default_method(void);
27902 const UI_METHOD *UI_get_method(UI *ui);
27903 const UI_METHOD *UI_set_method(UI *ui, const UI_METHOD *meth);
27904
27905
27906
27907
27908 UI_METHOD *UI_OpenSSL(void);
27909
27910
27911
27912
27913
27914
27915
27916 const UI_METHOD *UI_null(void);
27917 # 291 "include/openssl/ui.h"
27918 typedef struct ui_string_st UI_STRING;
27919
27920 struct stack_st_UI_STRING; typedef int (*sk_UI_STRING_compfunc)(const UI_STRING * const *a, const UI_STRING *const *b); typedef void (*sk_UI_STRING_freefunc)(UI_STRING *a); typedef UI_STRING * (*sk_UI_STRING_copyfunc)(const UI_STRING *a); static __attribute__((unused)) inline UI_STRING *ossl_check_UI_STRING_type(UI_STRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_UI_STRING_sk_type(const struct stack_st_UI_STRING *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_UI_STRING_sk_type(struct stack_st_UI_STRING *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_UI_STRING_compfunc_type(sk_UI_STRING_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_UI_STRING_copyfunc_type(sk_UI_STRING_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_UI_STRING_freefunc_type(sk_UI_STRING_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27921 # 325 "include/openssl/ui.h"
27922 enum UI_string_types {
27923 UIT_NONE = 0,
27924 UIT_PROMPT,
27925 UIT_VERIFY,
27926 UIT_BOOLEAN,
27927 UIT_INFO,
27928 UIT_ERROR
27929 };
27930
27931
27932 UI_METHOD *UI_create_method(const char *name);
27933 void UI_destroy_method(UI_METHOD *ui_method);
27934 int UI_method_set_opener(UI_METHOD *method, int (*opener) (UI *ui));
27935 int UI_method_set_writer(UI_METHOD *method,
27936 int (*writer) (UI *ui, UI_STRING *uis));
27937 int UI_method_set_flusher(UI_METHOD *method, int (*flusher) (UI *ui));
27938 int UI_method_set_reader(UI_METHOD *method,
27939 int (*reader) (UI *ui, UI_STRING *uis));
27940 int UI_method_set_closer(UI_METHOD *method, int (*closer) (UI *ui));
27941 int UI_method_set_data_duplicator(UI_METHOD *method,
27942 void *(*duplicator) (UI *ui, void *ui_data),
27943 void (*destructor)(UI *ui, void *ui_data));
27944 int UI_method_set_prompt_constructor(UI_METHOD *method,
27945 char *(*prompt_constructor) (UI *ui,
27946 const char
27947 *phrase_desc,
27948 const char
27949 *object_name));
27950 int UI_method_set_ex_data(UI_METHOD *method, int idx, void *data);
27951 int (*UI_method_get_opener(const UI_METHOD *method)) (UI *);
27952 int (*UI_method_get_writer(const UI_METHOD *method)) (UI *, UI_STRING *);
27953 int (*UI_method_get_flusher(const UI_METHOD *method)) (UI *);
27954 int (*UI_method_get_reader(const UI_METHOD *method)) (UI *, UI_STRING *);
27955 int (*UI_method_get_closer(const UI_METHOD *method)) (UI *);
27956 char *(*UI_method_get_prompt_constructor(const UI_METHOD *method))
27957 (UI *, const char *, const char *);
27958 void *(*UI_method_get_data_duplicator(const UI_METHOD *method)) (UI *, void *);
27959 void (*UI_method_get_data_destructor(const UI_METHOD *method)) (UI *, void *);
27960 const void *UI_method_get_ex_data(const UI_METHOD *method, int idx);
27961
27962
27963
27964
27965
27966
27967
27968 enum UI_string_types UI_get_string_type(UI_STRING *uis);
27969
27970 int UI_get_input_flags(UI_STRING *uis);
27971
27972 const char *UI_get0_output_string(UI_STRING *uis);
27973
27974
27975
27976
27977 const char *UI_get0_action_string(UI_STRING *uis);
27978
27979 const char *UI_get0_result_string(UI_STRING *uis);
27980 int UI_get_result_string_length(UI_STRING *uis);
27981
27982
27983
27984 const char *UI_get0_test_string(UI_STRING *uis);
27985
27986 int UI_get_result_minsize(UI_STRING *uis);
27987
27988 int UI_get_result_maxsize(UI_STRING *uis);
27989
27990 int UI_set_result(UI *ui, UI_STRING *uis, const char *result);
27991 int UI_set_result_ex(UI *ui, UI_STRING *uis, const char *result, int len);
27992
27993
27994 int UI_UTIL_read_pw_string(char *buf, int length, const char *prompt,
27995 int verify);
27996 int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt,
27997 int verify);
27998 UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag);
27999 # 31 "include/openssl/engine.h" 2
28000
28001
28002 # 1 "include/openssl/types.h" 1
28003 # 34 "include/openssl/engine.h" 2
28004
28005
28006 # 1 "include/openssl/engineerr.h" 1
28007 # 13 "include/openssl/engineerr.h"
28008
28009 # 37 "include/openssl/engine.h" 2
28010 # 257 "include/openssl/engine.h"
28011 typedef struct ENGINE_CMD_DEFN_st {
28012 unsigned int cmd_num;
28013 const char *cmd_name;
28014 const char *cmd_desc;
28015 unsigned int cmd_flags;
28016 } ENGINE_CMD_DEFN;
28017
28018
28019 typedef int (*ENGINE_GEN_FUNC_PTR) (void);
28020
28021 typedef int (*ENGINE_GEN_INT_FUNC_PTR) (ENGINE *);
28022
28023 typedef int (*ENGINE_CTRL_FUNC_PTR) (ENGINE *, int, long, void *,
28024 void (*f) (void));
28025
28026 typedef EVP_PKEY *(*ENGINE_LOAD_KEY_PTR)(ENGINE *, const char *,
28027 UI_METHOD *ui_method,
28028 void *callback_data);
28029 typedef int (*ENGINE_SSL_CLIENT_CERT_PTR) (ENGINE *, SSL *ssl,
28030 struct stack_st_X509_NAME *ca_dn,
28031 X509 **pcert, EVP_PKEY **pkey,
28032 struct stack_st_X509 **pother,
28033 UI_METHOD *ui_method,
28034 void *callback_data);
28035 # 296 "include/openssl/engine.h"
28036 typedef int (*ENGINE_CIPHERS_PTR) (ENGINE *, const EVP_CIPHER **,
28037 const int **, int);
28038 typedef int (*ENGINE_DIGESTS_PTR) (ENGINE *, const EVP_MD **, const int **,
28039 int);
28040 typedef int (*ENGINE_PKEY_METHS_PTR) (ENGINE *, EVP_PKEY_METHOD **,
28041 const int **, int);
28042 typedef int (*ENGINE_PKEY_ASN1_METHS_PTR) (ENGINE *, EVP_PKEY_ASN1_METHOD **,
28043 const int **, int);
28044 # 318 "include/openssl/engine.h"
28045 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_first(void);
28046 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_last(void);
28047
28048
28049
28050 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_next(ENGINE *e);
28051 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_prev(ENGINE *e);
28052
28053
28054
28055 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_add(ENGINE *e);
28056
28057
28058
28059 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_remove(ENGINE *e);
28060
28061
28062
28063 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_by_id(const char *id);
28064 # 358 "include/openssl/engine.h"
28065 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_load_builtin_engines(void);
28066
28067
28068
28069
28070
28071
28072
28073 __attribute__((deprecated("Since OpenSSL " "3.0"))) unsigned int ENGINE_get_table_flags(void);
28074 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_set_table_flags(unsigned int flags);
28075 # 378 "include/openssl/engine.h"
28076 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_RSA(ENGINE *e);
28077 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_RSA(ENGINE *e);
28078 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_RSA(void);
28079 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_DSA(ENGINE *e);
28080 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_DSA(ENGINE *e);
28081 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_DSA(void);
28082 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_EC(ENGINE *e);
28083 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_EC(ENGINE *e);
28084 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_EC(void);
28085 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_DH(ENGINE *e);
28086 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_DH(ENGINE *e);
28087 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_DH(void);
28088 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_RAND(ENGINE *e);
28089 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_RAND(ENGINE *e);
28090 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_RAND(void);
28091 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_ciphers(ENGINE *e);
28092 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_ciphers(ENGINE *e);
28093 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_ciphers(void);
28094 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_digests(ENGINE *e);
28095 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_digests(ENGINE *e);
28096 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_digests(void);
28097 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_pkey_meths(ENGINE *e);
28098 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_pkey_meths(ENGINE *e);
28099 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_pkey_meths(void);
28100 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_pkey_asn1_meths(ENGINE *e);
28101 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_pkey_asn1_meths(ENGINE *e);
28102 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_pkey_asn1_meths(void);
28103 # 414 "include/openssl/engine.h"
28104 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_complete(ENGINE *e);
28105 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_all_complete(void);
28106 # 429 "include/openssl/engine.h"
28107 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p,
28108 void (*f) (void));
28109 # 440 "include/openssl/engine.h"
28110 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_cmd_is_executable(ENGINE *e, int cmd);
28111 # 450 "include/openssl/engine.h"
28112 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
28113 long i, void *p, void (*f) (void),
28114 int cmd_optional);
28115 # 478 "include/openssl/engine.h"
28116 __attribute__((deprecated("Since OpenSSL " "3.0")))
28117 int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
28118 int cmd_optional);
28119 # 492 "include/openssl/engine.h"
28120 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_new(void);
28121 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_free(ENGINE *e);
28122 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_up_ref(ENGINE *e);
28123 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_id(ENGINE *e, const char *id);
28124 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_name(ENGINE *e, const char *name);
28125 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth);
28126 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth);
28127 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_EC(ENGINE *e, const EC_KEY_METHOD *ecdsa_meth);
28128 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth);
28129 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth);
28130 __attribute__((deprecated("Since OpenSSL " "3.0")))
28131 int ENGINE_set_destroy_function(ENGINE *e,ENGINE_GEN_INT_FUNC_PTR destroy_f);
28132 __attribute__((deprecated("Since OpenSSL " "3.0")))
28133 int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f);
28134 __attribute__((deprecated("Since OpenSSL " "3.0")))
28135 int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f);
28136 __attribute__((deprecated("Since OpenSSL " "3.0")))
28137 int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f);
28138 __attribute__((deprecated("Since OpenSSL " "3.0")))
28139 int ENGINE_set_load_privkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpriv_f);
28140 __attribute__((deprecated("Since OpenSSL " "3.0")))
28141 int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f);
28142 __attribute__((deprecated("Since OpenSSL " "3.0")))
28143 int ENGINE_set_load_ssl_client_cert_function(ENGINE *e,
28144 ENGINE_SSL_CLIENT_CERT_PTR loadssl_f);
28145 __attribute__((deprecated("Since OpenSSL " "3.0")))
28146 int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f);
28147 __attribute__((deprecated("Since OpenSSL " "3.0")))
28148 int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f);
28149 __attribute__((deprecated("Since OpenSSL " "3.0")))
28150 int ENGINE_set_pkey_meths(ENGINE *e, ENGINE_PKEY_METHS_PTR f);
28151 __attribute__((deprecated("Since OpenSSL " "3.0")))
28152 int ENGINE_set_pkey_asn1_meths(ENGINE *e, ENGINE_PKEY_ASN1_METHS_PTR f);
28153 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_flags(ENGINE *e, int flags);
28154 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_cmd_defns(ENGINE *e,
28155 const ENGINE_CMD_DEFN *defns);
28156
28157
28158
28159
28160
28161 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg);
28162 __attribute__((deprecated("Since OpenSSL " "3.0"))) void *ENGINE_get_ex_data(const ENGINE *e, int idx);
28163 # 552 "include/openssl/engine.h"
28164 __attribute__((deprecated("Since OpenSSL " "3.0"))) const char *ENGINE_get_id(const ENGINE *e);
28165 __attribute__((deprecated("Since OpenSSL " "3.0"))) const char *ENGINE_get_name(const ENGINE *e);
28166 __attribute__((deprecated("Since OpenSSL " "3.0"))) const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e);
28167 __attribute__((deprecated("Since OpenSSL " "3.0"))) const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e);
28168 __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_KEY_METHOD *ENGINE_get_EC(const ENGINE *e);
28169 __attribute__((deprecated("Since OpenSSL " "3.0"))) const DH_METHOD *ENGINE_get_DH(const ENGINE *e);
28170 __attribute__((deprecated("Since OpenSSL " "3.0"))) const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e);
28171 __attribute__((deprecated("Since OpenSSL " "3.0")))
28172 ENGINE_GEN_INT_FUNC_PTR ENGINE_get_destroy_function(const ENGINE *e);
28173 __attribute__((deprecated("Since OpenSSL " "3.0")))
28174 ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(const ENGINE *e);
28175 __attribute__((deprecated("Since OpenSSL " "3.0")))
28176 ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(const ENGINE *e);
28177 __attribute__((deprecated("Since OpenSSL " "3.0")))
28178 ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(const ENGINE *e);
28179 __attribute__((deprecated("Since OpenSSL " "3.0")))
28180 ENGINE_LOAD_KEY_PTR ENGINE_get_load_privkey_function(const ENGINE *e);
28181 __attribute__((deprecated("Since OpenSSL " "3.0")))
28182 ENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e);
28183 __attribute__((deprecated("Since OpenSSL " "3.0")))
28184 ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE *e);
28185 __attribute__((deprecated("Since OpenSSL " "3.0")))
28186 ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e);
28187 __attribute__((deprecated("Since OpenSSL " "3.0")))
28188 ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e);
28189 __attribute__((deprecated("Since OpenSSL " "3.0")))
28190 ENGINE_PKEY_METHS_PTR ENGINE_get_pkey_meths(const ENGINE *e);
28191 __attribute__((deprecated("Since OpenSSL " "3.0")))
28192 ENGINE_PKEY_ASN1_METHS_PTR ENGINE_get_pkey_asn1_meths(const ENGINE *e);
28193 __attribute__((deprecated("Since OpenSSL " "3.0")))
28194 const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid);
28195 __attribute__((deprecated("Since OpenSSL " "3.0")))
28196 const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid);
28197 __attribute__((deprecated("Since OpenSSL " "3.0")))
28198 const EVP_PKEY_METHOD *ENGINE_get_pkey_meth(ENGINE *e, int nid);
28199 __attribute__((deprecated("Since OpenSSL " "3.0")))
28200 const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth(ENGINE *e, int nid);
28201 __attribute__((deprecated("Since OpenSSL " "3.0")))
28202 const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e,
28203 const char *str,
28204 int len);
28205 __attribute__((deprecated("Since OpenSSL " "3.0")))
28206 const EVP_PKEY_ASN1_METHOD *ENGINE_pkey_asn1_find_str(ENGINE **pe,
28207 const char *str, int len);
28208 __attribute__((deprecated("Since OpenSSL " "3.0")))
28209 const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e);
28210 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_get_flags(const ENGINE *e);
28211 # 620 "include/openssl/engine.h"
28212 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_init(ENGINE *e);
28213
28214
28215
28216
28217
28218
28219
28220 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_finish(ENGINE *e);
28221 # 637 "include/openssl/engine.h"
28222 __attribute__((deprecated("Since OpenSSL " "3.0")))
28223 EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
28224 UI_METHOD *ui_method, void *callback_data);
28225 __attribute__((deprecated("Since OpenSSL " "3.0")))
28226 EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,
28227 UI_METHOD *ui_method, void *callback_data);
28228 __attribute__((deprecated("Since OpenSSL " "3.0")))
28229 int ENGINE_load_ssl_client_cert(ENGINE *e, SSL *s, struct stack_st_X509_NAME *ca_dn,
28230 X509 **pcert, EVP_PKEY **ppkey,
28231 struct stack_st_X509 **pother,
28232 UI_METHOD *ui_method, void *callback_data);
28233 # 657 "include/openssl/engine.h"
28234 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_default_RSA(void);
28235
28236
28237
28238 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_default_DSA(void);
28239 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_default_EC(void);
28240 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_default_DH(void);
28241 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_default_RAND(void);
28242
28243
28244
28245
28246
28247
28248 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_cipher_engine(int nid);
28249 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_digest_engine(int nid);
28250 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_pkey_meth_engine(int nid);
28251 __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_pkey_asn1_meth_engine(int nid);
28252 # 684 "include/openssl/engine.h"
28253 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_RSA(ENGINE *e);
28254 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_string(ENGINE *e,
28255 const char *def_list);
28256
28257
28258
28259 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_DSA(ENGINE *e);
28260 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_EC(ENGINE *e);
28261 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_DH(ENGINE *e);
28262 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_RAND(ENGINE *e);
28263 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_ciphers(ENGINE *e);
28264 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_digests(ENGINE *e);
28265 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_pkey_meths(ENGINE *e);
28266 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_pkey_asn1_meths(ENGINE *e);
28267 # 708 "include/openssl/engine.h"
28268 __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default(ENGINE *e, unsigned int flags);
28269 __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_add_conf_module(void);
28270 # 738 "include/openssl/engine.h"
28271 typedef void *(*dyn_MEM_malloc_fn) (size_t, const char *, int);
28272 typedef void *(*dyn_MEM_realloc_fn) (void *, size_t, const char *, int);
28273 typedef void (*dyn_MEM_free_fn) (void *, const char *, int);
28274 typedef struct st_dynamic_MEM_fns {
28275 dyn_MEM_malloc_fn malloc_fn;
28276 dyn_MEM_realloc_fn realloc_fn;
28277 dyn_MEM_free_fn free_fn;
28278 } dynamic_MEM_fns;
28279
28280
28281
28282
28283
28284 typedef struct st_dynamic_fns {
28285 void *static_state;
28286 dynamic_MEM_fns mem_fns;
28287 } dynamic_fns;
28288 # 768 "include/openssl/engine.h"
28289 typedef unsigned long (*dynamic_v_check_fn) (unsigned long ossl_version);
28290 # 793 "include/openssl/engine.h"
28291 typedef int (*dynamic_bind_engine) (ENGINE *e, const char *id,
28292 const dynamic_fns *fns);
28293 # 820 "include/openssl/engine.h"
28294 void *ENGINE_get_static_state(void);
28295 # 21 "ssl/ssl_lib.c" 2
28296
28297
28298
28299 # 1 "include/openssl/core_names.h" 1
28300 # 16 "include/openssl/core_names.h"
28301
28302 # 25 "ssl/ssl_lib.c" 2
28303
28304
28305
28306
28307
28308
28309 static int ssl_undefined_function_3(SSL_CONNECTION *sc, unsigned char *r,
28310 unsigned char *s, size_t t, size_t *u)
28311 {
28312 return ssl_undefined_function((&(sc)->ssl));
28313 }
28314
28315 static int ssl_undefined_function_4(SSL_CONNECTION *sc, int r)
28316 {
28317 return ssl_undefined_function((&(sc)->ssl));
28318 }
28319
28320 static size_t ssl_undefined_function_5(SSL_CONNECTION *sc, const char *r,
28321 size_t s, unsigned char *t)
28322 {
28323 return ssl_undefined_function((&(sc)->ssl));
28324 }
28325
28326 static int ssl_undefined_function_6(int r)
28327 {
28328 return ssl_undefined_function(
28329 # 50 "ssl/ssl_lib.c" 3 4
28330 ((void *)0)
28331 # 50 "ssl/ssl_lib.c"
28332 );
28333 }
28334
28335 static int ssl_undefined_function_7(SSL_CONNECTION *sc, unsigned char *r,
28336 size_t s, const char *t, size_t u,
28337 const unsigned char *v, size_t w, int x)
28338 {
28339 return ssl_undefined_function((&(sc)->ssl));
28340 }
28341
28342 static int ssl_undefined_function_8(SSL_CONNECTION *sc)
28343 {
28344 return ssl_undefined_function((&(sc)->ssl));
28345 }
28346
28347 const SSL3_ENC_METHOD ssl3_undef_enc_method = {
28348 ssl_undefined_function_8,
28349 ssl_undefined_function_3,
28350 ssl_undefined_function_4,
28351 ssl_undefined_function_5,
28352
28353 # 70 "ssl/ssl_lib.c" 3 4
28354 ((void *)0)
28355 # 70 "ssl/ssl_lib.c"
28356 ,
28357 0,
28358
28359 # 72 "ssl/ssl_lib.c" 3 4
28360 ((void *)0)
28361 # 72 "ssl/ssl_lib.c"
28362 ,
28363 0,
28364 ssl_undefined_function_6,
28365 ssl_undefined_function_7,
28366 };
28367
28368 struct ssl_async_args {
28369 SSL *s;
28370 void *buf;
28371 size_t num;
28372 enum { READFUNC, WRITEFUNC, OTHERFUNC } type;
28373 union {
28374 int (*func_read) (SSL *, void *, size_t, size_t *);
28375 int (*func_write) (SSL *, const void *, size_t, size_t *);
28376 int (*func_other) (SSL *);
28377 } f;
28378 };
28379
28380 static const struct {
28381 uint8_t mtype;
28382 uint8_t ord;
28383 int nid;
28384 } dane_mds[] = {
28385 {
28386 0, 0, 0
28387 },
28388 {
28389 1, 1, 672
28390 },
28391 {
28392 2, 2, 674
28393 },
28394 };
28395
28396 static int dane_ctx_enable(struct dane_ctx_st *dctx)
28397 {
28398 const EVP_MD **mdevp;
28399 uint8_t *mdord;
28400 uint8_t mdmax = 2;
28401 int n = ((int)mdmax) + 1;
28402 size_t i;
28403
28404 if (dctx->mdevp !=
28405 # 114 "ssl/ssl_lib.c" 3 4
28406 ((void *)0)
28407 # 114 "ssl/ssl_lib.c"
28408 )
28409 return 1;
28410
28411 mdevp = CRYPTO_zalloc(n * sizeof(*mdevp), "ssl/ssl_lib.c", 117);
28412 mdord = CRYPTO_zalloc(n * sizeof(*mdord), "ssl/ssl_lib.c", 118);
28413
28414 if (mdord ==
28415 # 120 "ssl/ssl_lib.c" 3 4
28416 ((void *)0)
28417 # 120 "ssl/ssl_lib.c"
28418 || mdevp ==
28419 # 120 "ssl/ssl_lib.c" 3 4
28420 ((void *)0)
28421 # 120 "ssl/ssl_lib.c"
28422 ) {
28423 CRYPTO_free(mdord, "ssl/ssl_lib.c", 121);
28424 CRYPTO_free(mdevp, "ssl/ssl_lib.c", 122);
28425 return 0;
28426 }
28427
28428
28429 for (i = 0; i < (sizeof(dane_mds)/sizeof((dane_mds)[0])); ++i) {
28430 const EVP_MD *md;
28431
28432 if (dane_mds[i].nid == 0 ||
28433 (md = EVP_get_digestbyname(OBJ_nid2sn(dane_mds[i].nid))) ==
28434 # 131 "ssl/ssl_lib.c" 3 4
28435 ((void *)0)
28436 # 131 "ssl/ssl_lib.c"
28437 )
28438 continue;
28439 mdevp[dane_mds[i].mtype] = md;
28440 mdord[dane_mds[i].mtype] = dane_mds[i].ord;
28441 }
28442
28443 dctx->mdevp = mdevp;
28444 dctx->mdord = mdord;
28445 dctx->mdmax = mdmax;
28446
28447 return 1;
28448 }
28449
28450 static void dane_ctx_final(struct dane_ctx_st *dctx)
28451 {
28452 CRYPTO_free(dctx->mdevp, "ssl/ssl_lib.c", 146);
28453 dctx->mdevp =
28454 # 147 "ssl/ssl_lib.c" 3 4
28455 ((void *)0)
28456 # 147 "ssl/ssl_lib.c"
28457 ;
28458
28459 CRYPTO_free(dctx->mdord, "ssl/ssl_lib.c", 149);
28460 dctx->mdord =
28461 # 150 "ssl/ssl_lib.c" 3 4
28462 ((void *)0)
28463 # 150 "ssl/ssl_lib.c"
28464 ;
28465 dctx->mdmax = 0;
28466 }
28467
28468 static void tlsa_free(danetls_record *t)
28469 {
28470 if (t ==
28471 # 156 "ssl/ssl_lib.c" 3 4
28472 ((void *)0)
28473 # 156 "ssl/ssl_lib.c"
28474 )
28475 return;
28476 CRYPTO_free(t->data, "ssl/ssl_lib.c", 158);
28477 EVP_PKEY_free(t->spki);
28478 CRYPTO_free(t, "ssl/ssl_lib.c", 160);
28479 }
28480
28481 static void dane_final(SSL_DANE *dane)
28482 {
28483 sk_danetls_record_pop_free(dane->trecs, tlsa_free);
28484 dane->trecs =
28485 # 166 "ssl/ssl_lib.c" 3 4
28486 ((void *)0)
28487 # 166 "ssl/ssl_lib.c"
28488 ;
28489
28490 OSSL_STACK_OF_X509_free(dane->certs);
28491 dane->certs =
28492 # 169 "ssl/ssl_lib.c" 3 4
28493 ((void *)0)
28494 # 169 "ssl/ssl_lib.c"
28495 ;
28496
28497 X509_free(dane->mcert);
28498 dane->mcert =
28499 # 172 "ssl/ssl_lib.c" 3 4
28500 ((void *)0)
28501 # 172 "ssl/ssl_lib.c"
28502 ;
28503 dane->mtlsa =
28504 # 173 "ssl/ssl_lib.c" 3 4
28505 ((void *)0)
28506 # 173 "ssl/ssl_lib.c"
28507 ;
28508 dane->mdpth = -1;
28509 dane->pdpth = -1;
28510 }
28511
28512
28513
28514
28515 static int ssl_dane_dup(SSL_CONNECTION *to, SSL_CONNECTION *from)
28516 {
28517 int num;
28518 int i;
28519
28520 if (!((&from->dane) !=
28521 # 186 "ssl/ssl_lib.c" 3 4
28522 ((void *)0)
28523 # 186 "ssl/ssl_lib.c"
28524 && sk_danetls_record_num((&from->dane)->trecs) > 0))
28525 return 1;
28526
28527 num = sk_danetls_record_num(from->dane.trecs);
28528 dane_final(&to->dane);
28529 to->dane.flags = from->dane.flags;
28530 to->dane.dctx = &((to)->ssl.ctx)->dane;
28531 to->dane.trecs = sk_danetls_record_new_reserve(
28532 # 193 "ssl/ssl_lib.c" 3 4
28533 ((void *)0)
28534 # 193 "ssl/ssl_lib.c"
28535 , num);
28536
28537 if (to->dane.trecs ==
28538 # 195 "ssl/ssl_lib.c" 3 4
28539 ((void *)0)
28540 # 195 "ssl/ssl_lib.c"
28541 ) {
28542 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",196,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
28543 # 196 "ssl/ssl_lib.c" 3 4
28544 ((void *)0)
28545 # 196 "ssl/ssl_lib.c"
28546 );
28547 return 0;
28548 }
28549
28550 for (i = 0; i < num; ++i) {
28551 danetls_record *t = sk_danetls_record_value(from->dane.trecs, i);
28552
28553 if (SSL_dane_tlsa_add((&(to)->ssl), t->usage,
28554 t->selector, t->mtype, t->data, t->dlen) <= 0)
28555 return 0;
28556 }
28557 return 1;
28558 }
28559
28560 static int dane_mtype_set(struct dane_ctx_st *dctx,
28561 const EVP_MD *md, uint8_t mtype, uint8_t ord)
28562 {
28563 int i;
28564
28565 if (mtype == 0 && md !=
28566 # 215 "ssl/ssl_lib.c" 3 4
28567 ((void *)0)
28568 # 215 "ssl/ssl_lib.c"
28569 ) {
28570 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",216,__func__), ERR_set_error)((20),(173),
28571 # 216 "ssl/ssl_lib.c" 3 4
28572 ((void *)0)
28573 # 216 "ssl/ssl_lib.c"
28574 );
28575 return 0;
28576 }
28577
28578 if (mtype > dctx->mdmax) {
28579 const EVP_MD **mdevp;
28580 uint8_t *mdord;
28581 int n = ((int)mtype) + 1;
28582
28583 mdevp = CRYPTO_realloc(dctx->mdevp, n * sizeof(*mdevp), "ssl/ssl_lib.c", 225);
28584 if (mdevp ==
28585 # 226 "ssl/ssl_lib.c" 3 4
28586 ((void *)0)
28587 # 226 "ssl/ssl_lib.c"
28588 )
28589 return -1;
28590 dctx->mdevp = mdevp;
28591
28592 mdord = CRYPTO_realloc(dctx->mdord, n * sizeof(*mdord), "ssl/ssl_lib.c", 230);
28593 if (mdord ==
28594 # 231 "ssl/ssl_lib.c" 3 4
28595 ((void *)0)
28596 # 231 "ssl/ssl_lib.c"
28597 )
28598 return -1;
28599 dctx->mdord = mdord;
28600
28601
28602 for (i = dctx->mdmax + 1; i < mtype; ++i) {
28603 mdevp[i] =
28604 # 237 "ssl/ssl_lib.c" 3 4
28605 ((void *)0)
28606 # 237 "ssl/ssl_lib.c"
28607 ;
28608 mdord[i] = 0;
28609 }
28610
28611 dctx->mdmax = mtype;
28612 }
28613
28614 dctx->mdevp[mtype] = md;
28615
28616 dctx->mdord[mtype] = (md ==
28617 # 246 "ssl/ssl_lib.c" 3 4
28618 ((void *)0)
28619 # 246 "ssl/ssl_lib.c"
28620 ) ? 0 : ord;
28621
28622 return 1;
28623 }
28624
28625 static const EVP_MD *tlsa_md_get(SSL_DANE *dane, uint8_t mtype)
28626 {
28627 if (mtype > dane->dctx->mdmax)
28628 return
28629 # 254 "ssl/ssl_lib.c" 3 4
28630 ((void *)0)
28631 # 254 "ssl/ssl_lib.c"
28632 ;
28633 return dane->dctx->mdevp[mtype];
28634 }
28635
28636 static int dane_tlsa_add(SSL_DANE *dane,
28637 uint8_t usage,
28638 uint8_t selector,
28639 uint8_t mtype, const unsigned char *data, size_t dlen)
28640 {
28641 danetls_record *t;
28642 const EVP_MD *md =
28643 # 264 "ssl/ssl_lib.c" 3 4
28644 ((void *)0)
28645 # 264 "ssl/ssl_lib.c"
28646 ;
28647 int ilen = (int)dlen;
28648 int i;
28649 int num;
28650
28651 if (dane->trecs ==
28652 # 269 "ssl/ssl_lib.c" 3 4
28653 ((void *)0)
28654 # 269 "ssl/ssl_lib.c"
28655 ) {
28656 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",270,__func__), ERR_set_error)((20),(175),
28657 # 270 "ssl/ssl_lib.c" 3 4
28658 ((void *)0)
28659 # 270 "ssl/ssl_lib.c"
28660 );
28661 return -1;
28662 }
28663
28664 if (ilen < 0 || dlen != (size_t)ilen) {
28665 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",275,__func__), ERR_set_error)((20),(189),
28666 # 275 "ssl/ssl_lib.c" 3 4
28667 ((void *)0)
28668 # 275 "ssl/ssl_lib.c"
28669 );
28670 return 0;
28671 }
28672
28673 if (usage > 3) {
28674 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",280,__func__), ERR_set_error)((20),(184),
28675 # 280 "ssl/ssl_lib.c" 3 4
28676 ((void *)0)
28677 # 280 "ssl/ssl_lib.c"
28678 );
28679 return 0;
28680 }
28681
28682 if (selector > 1) {
28683 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",285,__func__), ERR_set_error)((20),(202),
28684 # 285 "ssl/ssl_lib.c" 3 4
28685 ((void *)0)
28686 # 285 "ssl/ssl_lib.c"
28687 );
28688 return 0;
28689 }
28690
28691 if (mtype != 0) {
28692 md = tlsa_md_get(dane, mtype);
28693 if (md ==
28694 # 291 "ssl/ssl_lib.c" 3 4
28695 ((void *)0)
28696 # 291 "ssl/ssl_lib.c"
28697 ) {
28698 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",292,__func__), ERR_set_error)((20),(200),
28699 # 292 "ssl/ssl_lib.c" 3 4
28700 ((void *)0)
28701 # 292 "ssl/ssl_lib.c"
28702 );
28703 return 0;
28704 }
28705 }
28706
28707 if (md !=
28708 # 297 "ssl/ssl_lib.c" 3 4
28709 ((void *)0)
28710 # 297 "ssl/ssl_lib.c"
28711 && dlen != (size_t)EVP_MD_get_size(md)) {
28712 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",298,__func__), ERR_set_error)((20),(192),
28713 # 298 "ssl/ssl_lib.c" 3 4
28714 ((void *)0)
28715 # 298 "ssl/ssl_lib.c"
28716 );
28717 return 0;
28718 }
28719 if (!data) {
28720 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",302,__func__), ERR_set_error)((20),(203),
28721 # 302 "ssl/ssl_lib.c" 3 4
28722 ((void *)0)
28723 # 302 "ssl/ssl_lib.c"
28724 );
28725 return 0;
28726 }
28727
28728 if ((t = CRYPTO_zalloc(sizeof(*t), "ssl/ssl_lib.c", 306)) ==
28729 # 306 "ssl/ssl_lib.c" 3 4
28730 ((void *)0)
28731 # 306 "ssl/ssl_lib.c"
28732 )
28733 return -1;
28734
28735 t->usage = usage;
28736 t->selector = selector;
28737 t->mtype = mtype;
28738 t->data = CRYPTO_malloc(dlen, "ssl/ssl_lib.c", 312);
28739 if (t->data ==
28740 # 313 "ssl/ssl_lib.c" 3 4
28741 ((void *)0)
28742 # 313 "ssl/ssl_lib.c"
28743 ) {
28744 tlsa_free(t);
28745 return -1;
28746 }
28747 memcpy(t->data, data, dlen);
28748 t->dlen = dlen;
28749
28750
28751 if (mtype == 0) {
28752 const unsigned char *p = data;
28753 X509 *cert =
28754 # 323 "ssl/ssl_lib.c" 3 4
28755 ((void *)0)
28756 # 323 "ssl/ssl_lib.c"
28757 ;
28758 EVP_PKEY *pkey =
28759 # 324 "ssl/ssl_lib.c" 3 4
28760 ((void *)0)
28761 # 324 "ssl/ssl_lib.c"
28762 ;
28763
28764 switch (selector) {
28765 case 0:
28766 if (!d2i_X509(&cert, &p, ilen) || p < data ||
28767 dlen != (size_t)(p - data)) {
28768 X509_free(cert);
28769 tlsa_free(t);
28770 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",332,__func__), ERR_set_error)((20),(180),
28771 # 332 "ssl/ssl_lib.c" 3 4
28772 ((void *)0)
28773 # 332 "ssl/ssl_lib.c"
28774 );
28775 return 0;
28776 }
28777 if (X509_get0_pubkey(cert) ==
28778 # 335 "ssl/ssl_lib.c" 3 4
28779 ((void *)0)
28780 # 335 "ssl/ssl_lib.c"
28781 ) {
28782 X509_free(cert);
28783 tlsa_free(t);
28784 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",338,__func__), ERR_set_error)((20),(180),
28785 # 338 "ssl/ssl_lib.c" 3 4
28786 ((void *)0)
28787 # 338 "ssl/ssl_lib.c"
28788 );
28789 return 0;
28790 }
28791
28792 if (((((uint32_t)1) << usage) & (((((uint32_t)1) << 0)) | ((((uint32_t)1) << 2)))) == 0) {
28793 # 355 "ssl/ssl_lib.c"
28794 X509_free(cert);
28795 break;
28796 }
28797 # 366 "ssl/ssl_lib.c"
28798 if ((dane->certs ==
28799 # 366 "ssl/ssl_lib.c" 3 4
28800 ((void *)0)
28801 # 366 "ssl/ssl_lib.c"
28802 &&
28803 (dane->certs = ((struct stack_st_X509 *)OPENSSL_sk_new_null())) ==
28804 # 367 "ssl/ssl_lib.c" 3 4
28805 ((void *)0)
28806 # 367 "ssl/ssl_lib.c"
28807 ) ||
28808 !OPENSSL_sk_push(ossl_check_X509_sk_type(dane->certs), ossl_check_X509_type(cert))) {
28809 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",369,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
28810 # 369 "ssl/ssl_lib.c" 3 4
28811 ((void *)0)
28812 # 369 "ssl/ssl_lib.c"
28813 );
28814 X509_free(cert);
28815 tlsa_free(t);
28816 return -1;
28817 }
28818 break;
28819
28820 case 1:
28821 if (!d2i_PUBKEY(&pkey, &p, ilen) || p < data ||
28822 dlen != (size_t)(p - data)) {
28823 EVP_PKEY_free(pkey);
28824 tlsa_free(t);
28825 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",381,__func__), ERR_set_error)((20),(201),
28826 # 381 "ssl/ssl_lib.c" 3 4
28827 ((void *)0)
28828 # 381 "ssl/ssl_lib.c"
28829 );
28830 return 0;
28831 }
28832
28833
28834
28835
28836
28837
28838 if (usage == 2)
28839 t->spki = pkey;
28840 else
28841 EVP_PKEY_free(pkey);
28842 break;
28843 }
28844 }
28845 # 412 "ssl/ssl_lib.c"
28846 num = sk_danetls_record_num(dane->trecs);
28847 for (i = 0; i < num; ++i) {
28848 danetls_record *rec = sk_danetls_record_value(dane->trecs, i);
28849
28850 if (rec->usage > usage)
28851 continue;
28852 if (rec->usage < usage)
28853 break;
28854 if (rec->selector > selector)
28855 continue;
28856 if (rec->selector < selector)
28857 break;
28858 if (dane->dctx->mdord[rec->mtype] > dane->dctx->mdord[mtype])
28859 continue;
28860 break;
28861 }
28862
28863 if (!sk_danetls_record_insert(dane->trecs, t, i)) {
28864 tlsa_free(t);
28865 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",431,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
28866 # 431 "ssl/ssl_lib.c" 3 4
28867 ((void *)0)
28868 # 431 "ssl/ssl_lib.c"
28869 );
28870 return -1;
28871 }
28872 dane->umask |= (((uint32_t)1) << usage);
28873
28874 return 1;
28875 }
28876
28877
28878
28879
28880
28881 static int ssl_check_allowed_versions(int min_version, int max_version)
28882 {
28883 int minisdtls = 0, maxisdtls = 0;
28884
28885
28886 if (min_version == 0x0100
28887 || min_version >> 8 == 0xFE)
28888 minisdtls = 1;
28889 if (max_version == 0x0100
28890 || max_version >> 8 == 0xFE)
28891 maxisdtls = 1;
28892
28893 if ((minisdtls && !maxisdtls && max_version != 0)
28894 || (maxisdtls && !minisdtls && min_version != 0)) {
28895
28896 return 0;
28897 }
28898
28899 if (minisdtls || maxisdtls) {
28900
28901 if (min_version == 0)
28902
28903 min_version = 0xFEFF;
28904 if (max_version == 0)
28905 max_version = 0xFEFD;
28906 # 477 "ssl/ssl_lib.c"
28907 if (0
28908 # 486 "ssl/ssl_lib.c"
28909 )
28910 return 0;
28911 } else {
28912
28913 if (min_version == 0)
28914 min_version = 0x0300;
28915 if (max_version == 0)
28916 max_version = 0x0304;
28917 # 511 "ssl/ssl_lib.c"
28918 if (min_version == 0x0300)
28919 min_version = 0x0301;
28920 # 527 "ssl/ssl_lib.c"
28921 if (0
28922
28923 || (min_version <= 0x0300 && 0x0300 <= max_version)
28924 # 543 "ssl/ssl_lib.c"
28925 )
28926 return 0;
28927 }
28928 return 1;
28929 }
28930 # 561 "ssl/ssl_lib.c"
28931 int SSL_clear(SSL *s)
28932 {
28933 if (s->method ==
28934 # 563 "ssl/ssl_lib.c" 3 4
28935 ((void *)0)
28936 # 563 "ssl/ssl_lib.c"
28937 ) {
28938 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",564,__func__), ERR_set_error)((20),(188),
28939 # 564 "ssl/ssl_lib.c" 3 4
28940 ((void *)0)
28941 # 564 "ssl/ssl_lib.c"
28942 );
28943 return 0;
28944 }
28945
28946 return s->method->ssl_reset(s);
28947 }
28948
28949 int ossl_ssl_connection_reset(SSL *s)
28950 {
28951 SSL_CONNECTION *sc = ((s) ==
28952 # 573 "ssl/ssl_lib.c" 3 4
28953 ((void *)0)
28954 # 573 "ssl/ssl_lib.c"
28955 ?
28956 # 573 "ssl/ssl_lib.c" 3 4
28957 ((void *)0)
28958 # 573 "ssl/ssl_lib.c"
28959 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
28960 # 573 "ssl/ssl_lib.c" 3 4
28961 ((void *)0)
28962 # 573 "ssl/ssl_lib.c"
28963 )));
28964
28965 if (sc ==
28966 # 575 "ssl/ssl_lib.c" 3 4
28967 ((void *)0)
28968 # 575 "ssl/ssl_lib.c"
28969 )
28970 return 0;
28971
28972 if (ssl_clear_bad_session(sc)) {
28973 SSL_SESSION_free(sc->session);
28974 sc->session =
28975 # 580 "ssl/ssl_lib.c" 3 4
28976 ((void *)0)
28977 # 580 "ssl/ssl_lib.c"
28978 ;
28979 }
28980 SSL_SESSION_free(sc->psksession);
28981 sc->psksession =
28982 # 583 "ssl/ssl_lib.c" 3 4
28983 ((void *)0)
28984 # 583 "ssl/ssl_lib.c"
28985 ;
28986 CRYPTO_free(sc->psksession_id, "ssl/ssl_lib.c", 584);
28987 sc->psksession_id =
28988 # 585 "ssl/ssl_lib.c" 3 4
28989 ((void *)0)
28990 # 585 "ssl/ssl_lib.c"
28991 ;
28992 sc->psksession_id_len = 0;
28993 sc->hello_retry_request = SSL_HRR_NONE;
28994 sc->sent_tickets = 0;
28995
28996 sc->error = 0;
28997 sc->hit = 0;
28998 sc->shutdown = 0;
28999
29000 if (sc->renegotiate) {
29001 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",595,__func__), ERR_set_error)((20),((259|((0x1 << 18L)|(0x2 << 18L)))),
29002 # 595 "ssl/ssl_lib.c" 3 4
29003 ((void *)0)
29004 # 595 "ssl/ssl_lib.c"
29005 );
29006 return 0;
29007 }
29008
29009 ossl_statem_clear(sc);
29010
29011 sc->version = s->method->version;
29012 sc->client_version = sc->version;
29013 sc->rwstate = 1;
29014
29015 BUF_MEM_free(sc->init_buf);
29016 sc->init_buf =
29017 # 606 "ssl/ssl_lib.c" 3 4
29018 ((void *)0)
29019 # 606 "ssl/ssl_lib.c"
29020 ;
29021 sc->first_packet = 0;
29022
29023 sc->key_update = -1;
29024 memset(sc->ext.compress_certificate_from_peer, 0,
29025 sizeof(sc->ext.compress_certificate_from_peer));
29026 sc->ext.compress_certificate_sent = 0;
29027
29028 EVP_MD_CTX_free(sc->pha_dgst);
29029 sc->pha_dgst =
29030 # 615 "ssl/ssl_lib.c" 3 4
29031 ((void *)0)
29032 # 615 "ssl/ssl_lib.c"
29033 ;
29034
29035
29036 sc->dane.mdpth = -1;
29037 sc->dane.pdpth = -1;
29038 X509_free(sc->dane.mcert);
29039 sc->dane.mcert =
29040 # 621 "ssl/ssl_lib.c" 3 4
29041 ((void *)0)
29042 # 621 "ssl/ssl_lib.c"
29043 ;
29044 sc->dane.mtlsa =
29045 # 622 "ssl/ssl_lib.c" 3 4
29046 ((void *)0)
29047 # 622 "ssl/ssl_lib.c"
29048 ;
29049
29050
29051 X509_VERIFY_PARAM_move_peername(sc->param,
29052 # 625 "ssl/ssl_lib.c" 3 4
29053 ((void *)0)
29054 # 625 "ssl/ssl_lib.c"
29055 );
29056
29057
29058 CRYPTO_free(sc->shared_sigalgs, "ssl/ssl_lib.c", 628);
29059 sc->shared_sigalgs =
29060 # 629 "ssl/ssl_lib.c" 3 4
29061 ((void *)0)
29062 # 629 "ssl/ssl_lib.c"
29063 ;
29064 sc->shared_sigalgslen = 0;
29065
29066
29067
29068
29069
29070 if (s->method != s->defltmeth) {
29071 s->method->ssl_deinit(s);
29072 s->method = s->defltmeth;
29073 if (!s->method->ssl_init(s))
29074 return 0;
29075 } else {
29076 if (!s->method->ssl_clear(s))
29077 return 0;
29078 }
29079
29080 if (!RECORD_LAYER_reset(&sc->rlayer))
29081 return 0;
29082
29083 return 1;
29084 }
29085
29086
29087
29088 int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth)
29089 {
29090 struct stack_st_SSL_CIPHER *sk;
29091
29092 if ((((ctx)->method) == OSSL_QUIC_client_method() || ((ctx)->method) == OSSL_QUIC_client_thread_method())) {
29093 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",659,__func__), ERR_set_error)((20),(266),
29094 # 659 "ssl/ssl_lib.c" 3 4
29095 ((void *)0)
29096 # 659 "ssl/ssl_lib.c"
29097 );
29098 return 0;
29099 }
29100
29101 ctx->method = meth;
29102
29103 if (!SSL_CTX_set_ciphersuites(ctx, OSSL_default_ciphersuites())) {
29104 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",666,__func__), ERR_set_error)((20),(230),
29105 # 666 "ssl/ssl_lib.c" 3 4
29106 ((void *)0)
29107 # 666 "ssl/ssl_lib.c"
29108 );
29109 return 0;
29110 }
29111 sk = ssl_create_cipher_list(ctx,
29112 ctx->tls13_ciphersuites,
29113 &(ctx->cipher_list),
29114 &(ctx->cipher_list_by_id),
29115 OSSL_default_cipher_list(), ctx->cert);
29116 if ((sk ==
29117 # 674 "ssl/ssl_lib.c" 3 4
29118 ((void *)0)
29119 # 674 "ssl/ssl_lib.c"
29120 ) || (OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk)) <= 0)) {
29121 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",675,__func__), ERR_set_error)((20),(230),
29122 # 675 "ssl/ssl_lib.c" 3 4
29123 ((void *)0)
29124 # 675 "ssl/ssl_lib.c"
29125 );
29126 return 0;
29127 }
29128 return 1;
29129 }
29130
29131
29132 SSL *SSL_new(SSL_CTX *ctx)
29133 {
29134 if (ctx ==
29135 # 684 "ssl/ssl_lib.c" 3 4
29136 ((void *)0)
29137 # 684 "ssl/ssl_lib.c"
29138 ) {
29139 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",685,__func__), ERR_set_error)((20),(195),
29140 # 685 "ssl/ssl_lib.c" 3 4
29141 ((void *)0)
29142 # 685 "ssl/ssl_lib.c"
29143 );
29144 return
29145 # 686 "ssl/ssl_lib.c" 3 4
29146 ((void *)0)
29147 # 686 "ssl/ssl_lib.c"
29148 ;
29149 }
29150 if (ctx->method ==
29151 # 688 "ssl/ssl_lib.c" 3 4
29152 ((void *)0)
29153 # 688 "ssl/ssl_lib.c"
29154 ) {
29155 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",689,__func__), ERR_set_error)((20),(228),
29156 # 689 "ssl/ssl_lib.c" 3 4
29157 ((void *)0)
29158 # 689 "ssl/ssl_lib.c"
29159 );
29160 return
29161 # 690 "ssl/ssl_lib.c" 3 4
29162 ((void *)0)
29163 # 690 "ssl/ssl_lib.c"
29164 ;
29165 }
29166 return ctx->method->ssl_new(ctx);
29167 }
29168
29169 int ossl_ssl_init(SSL *ssl, SSL_CTX *ctx, const SSL_METHOD *method, int type)
29170 {
29171 ssl->type = type;
29172
29173 ssl->lock = CRYPTO_THREAD_lock_new();
29174 if (ssl->lock ==
29175 # 700 "ssl/ssl_lib.c" 3 4
29176 ((void *)0)
29177 # 700 "ssl/ssl_lib.c"
29178 )
29179 return 0;
29180
29181 if (!CRYPTO_NEW_REF(&ssl->references, 1)) {
29182 CRYPTO_THREAD_lock_free(ssl->lock);
29183 return 0;
29184 }
29185
29186 if (!CRYPTO_new_ex_data(0, ssl, &ssl->ex_data)) {
29187 CRYPTO_THREAD_lock_free(ssl->lock);
29188 CRYPTO_FREE_REF(&ssl->references);
29189 ssl->lock =
29190 # 711 "ssl/ssl_lib.c" 3 4
29191 ((void *)0)
29192 # 711 "ssl/ssl_lib.c"
29193 ;
29194 return 0;
29195 }
29196
29197 SSL_CTX_up_ref(ctx);
29198 ssl->ctx = ctx;
29199
29200 ssl->defltmeth = ssl->method = method;
29201
29202 return 1;
29203 }
29204
29205 SSL *ossl_ssl_connection_new_int(SSL_CTX *ctx, const SSL_METHOD *method)
29206 {
29207 SSL_CONNECTION *s;
29208 SSL *ssl;
29209
29210 s = CRYPTO_zalloc(sizeof(*s), "ssl/ssl_lib.c", 728);
29211 if (s ==
29212 # 729 "ssl/ssl_lib.c" 3 4
29213 ((void *)0)
29214 # 729 "ssl/ssl_lib.c"
29215 )
29216 return
29217 # 730 "ssl/ssl_lib.c" 3 4
29218 ((void *)0)
29219 # 730 "ssl/ssl_lib.c"
29220 ;
29221
29222 ssl = &s->ssl;
29223 if (!ossl_ssl_init(ssl, ctx, method, 0)) {
29224 CRYPTO_free(s, "ssl/ssl_lib.c", 734);
29225 s =
29226 # 735 "ssl/ssl_lib.c" 3 4
29227 ((void *)0)
29228 # 735 "ssl/ssl_lib.c"
29229 ;
29230 ssl =
29231 # 736 "ssl/ssl_lib.c" 3 4
29232 ((void *)0)
29233 # 736 "ssl/ssl_lib.c"
29234 ;
29235 goto sslerr;
29236 }
29237
29238 RECORD_LAYER_init(&s->rlayer, s);
29239
29240 s->options = ctx->options;
29241
29242 s->dane.flags = ctx->dane.flags;
29243 if (method->version == ctx->method->version) {
29244 s->min_proto_version = ctx->min_proto_version;
29245 s->max_proto_version = ctx->max_proto_version;
29246 }
29247
29248 s->mode = ctx->mode;
29249 s->max_cert_list = ctx->max_cert_list;
29250 s->max_early_data = ctx->max_early_data;
29251 s->recv_max_early_data = ctx->recv_max_early_data;
29252
29253 s->num_tickets = ctx->num_tickets;
29254 s->pha_enabled = ctx->pha_enabled;
29255
29256
29257 s->tls13_ciphersuites = ((struct stack_st_SSL_CIPHER *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(ctx->tls13_ciphersuites)));
29258 if (s->tls13_ciphersuites ==
29259 # 760 "ssl/ssl_lib.c" 3 4
29260 ((void *)0)
29261 # 760 "ssl/ssl_lib.c"
29262 )
29263 goto cerr;
29264 # 772 "ssl/ssl_lib.c"
29265 s->cert = ssl_cert_dup(ctx->cert);
29266 if (s->cert ==
29267 # 773 "ssl/ssl_lib.c" 3 4
29268 ((void *)0)
29269 # 773 "ssl/ssl_lib.c"
29270 )
29271 goto sslerr;
29272
29273 ((&s->rlayer)->read_ahead = (ctx->read_ahead));
29274 s->msg_callback = ctx->msg_callback;
29275 s->msg_callback_arg = ctx->msg_callback_arg;
29276 s->verify_mode = ctx->verify_mode;
29277 s->not_resumable_session_cb = ctx->not_resumable_session_cb;
29278 s->rlayer.record_padding_cb = ctx->record_padding_cb;
29279 s->rlayer.record_padding_arg = ctx->record_padding_arg;
29280 s->rlayer.block_padding = ctx->block_padding;
29281 s->sid_ctx_length = ctx->sid_ctx_length;
29282 if (!__builtin_expect(!!((s->sid_ctx_length <= sizeof(s->sid_ctx)) != 0), 1))
29283 goto err;
29284 memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx));
29285 s->verify_callback = ctx->default_verify_callback;
29286 s->generate_session_id = ctx->generate_session_id;
29287
29288 s->param = X509_VERIFY_PARAM_new();
29289 if (s->param ==
29290 # 792 "ssl/ssl_lib.c" 3 4
29291 ((void *)0)
29292 # 792 "ssl/ssl_lib.c"
29293 )
29294 goto asn1err;
29295 X509_VERIFY_PARAM_inherit(s->param, ctx->param);
29296 s->quiet_shutdown = (((ctx)->method) == OSSL_QUIC_client_method() || ((ctx)->method) == OSSL_QUIC_client_thread_method()) ? 0 : ctx->quiet_shutdown;
29297
29298 if (!(((ctx)->method) == OSSL_QUIC_client_method() || ((ctx)->method) == OSSL_QUIC_client_thread_method()))
29299 s->ext.max_fragment_len_mode = ctx->ext.max_fragment_len_mode;
29300
29301 s->max_send_fragment = ctx->max_send_fragment;
29302 s->split_send_fragment = ctx->split_send_fragment;
29303 s->max_pipelines = ctx->max_pipelines;
29304 s->rlayer.default_read_buf_len = ctx->default_read_buf_len;
29305
29306 s->ext.debug_cb = 0;
29307 s->ext.debug_arg =
29308 # 806 "ssl/ssl_lib.c" 3 4
29309 ((void *)0)
29310 # 806 "ssl/ssl_lib.c"
29311 ;
29312 s->ext.ticket_expected = 0;
29313 s->ext.status_type = ctx->ext.status_type;
29314 s->ext.status_expected = 0;
29315 s->ext.ocsp.ids =
29316 # 810 "ssl/ssl_lib.c" 3 4
29317 ((void *)0)
29318 # 810 "ssl/ssl_lib.c"
29319 ;
29320 s->ext.ocsp.exts =
29321 # 811 "ssl/ssl_lib.c" 3 4
29322 ((void *)0)
29323 # 811 "ssl/ssl_lib.c"
29324 ;
29325 s->ext.ocsp.resp =
29326 # 812 "ssl/ssl_lib.c" 3 4
29327 ((void *)0)
29328 # 812 "ssl/ssl_lib.c"
29329 ;
29330 s->ext.ocsp.resp_len = 0;
29331 SSL_CTX_up_ref(ctx);
29332 s->session_ctx = ctx;
29333 if (ctx->ext.ecpointformats) {
29334 s->ext.ecpointformats =
29335 CRYPTO_memdup((ctx->ext.ecpointformats), ctx->ext.ecpointformats_len, "ssl/ssl_lib.c", 818)
29336 ;
29337 if (!s->ext.ecpointformats) {
29338 s->ext.ecpointformats_len = 0;
29339 goto err;
29340 }
29341 s->ext.ecpointformats_len =
29342 ctx->ext.ecpointformats_len;
29343 }
29344 if (ctx->ext.supportedgroups) {
29345 s->ext.supportedgroups =
29346 CRYPTO_memdup((ctx->ext.supportedgroups), ctx->ext.supportedgroups_len * sizeof(*ctx->ext.supportedgroups), "ssl/ssl_lib.c", 829)
29347
29348 ;
29349 if (!s->ext.supportedgroups) {
29350 s->ext.supportedgroups_len = 0;
29351 goto err;
29352 }
29353 s->ext.supportedgroups_len = ctx->ext.supportedgroups_len;
29354 }
29355
29356
29357 s->ext.npn =
29358 # 840 "ssl/ssl_lib.c" 3 4
29359 ((void *)0)
29360 # 840 "ssl/ssl_lib.c"
29361 ;
29362
29363
29364 if (ctx->ext.alpn !=
29365 # 843 "ssl/ssl_lib.c" 3 4
29366 ((void *)0)
29367 # 843 "ssl/ssl_lib.c"
29368 ) {
29369 s->ext.alpn = CRYPTO_malloc(ctx->ext.alpn_len, "ssl/ssl_lib.c", 844);
29370 if (s->ext.alpn ==
29371 # 845 "ssl/ssl_lib.c" 3 4
29372 ((void *)0)
29373 # 845 "ssl/ssl_lib.c"
29374 ) {
29375 s->ext.alpn_len = 0;
29376 goto err;
29377 }
29378 memcpy(s->ext.alpn, ctx->ext.alpn, ctx->ext.alpn_len);
29379 s->ext.alpn_len = ctx->ext.alpn_len;
29380 }
29381
29382 s->verified_chain =
29383 # 853 "ssl/ssl_lib.c" 3 4
29384 ((void *)0)
29385 # 853 "ssl/ssl_lib.c"
29386 ;
29387 s->verify_result = 0;
29388
29389 s->default_passwd_callback = ctx->default_passwd_callback;
29390 s->default_passwd_callback_userdata = ctx->default_passwd_callback_userdata;
29391
29392 s->key_update = -1;
29393
29394 if (!(((ctx)->method) == OSSL_QUIC_client_method() || ((ctx)->method) == OSSL_QUIC_client_thread_method())) {
29395 s->allow_early_data_cb = ctx->allow_early_data_cb;
29396 s->allow_early_data_cb_data = ctx->allow_early_data_cb_data;
29397 }
29398
29399 if (!method->ssl_init(ssl))
29400 goto sslerr;
29401
29402 s->server = (method->ssl_accept == ssl_undefined_function) ? 0 : 1;
29403
29404 if (!method->ssl_reset(ssl))
29405 goto sslerr;
29406
29407
29408 s->psk_client_callback = ctx->psk_client_callback;
29409 s->psk_server_callback = ctx->psk_server_callback;
29410
29411 s->psk_find_session_cb = ctx->psk_find_session_cb;
29412 s->psk_use_session_cb = ctx->psk_use_session_cb;
29413
29414 s->async_cb = ctx->async_cb;
29415 s->async_cb_arg = ctx->async_cb_arg;
29416
29417 s->job =
29418 # 884 "ssl/ssl_lib.c" 3 4
29419 ((void *)0)
29420 # 884 "ssl/ssl_lib.c"
29421 ;
29422
29423
29424
29425
29426 if (ctx->client_cert_type !=
29427 # 889 "ssl/ssl_lib.c" 3 4
29428 ((void *)0)
29429 # 889 "ssl/ssl_lib.c"
29430 ) {
29431 s->client_cert_type = CRYPTO_memdup((ctx->client_cert_type), ctx->client_cert_type_len, "ssl/ssl_lib.c", 890)
29432 ;
29433 if (s->client_cert_type ==
29434 # 892 "ssl/ssl_lib.c" 3 4
29435 ((void *)0)
29436 # 892 "ssl/ssl_lib.c"
29437 )
29438 goto sslerr;
29439 s->client_cert_type_len = ctx->client_cert_type_len;
29440 }
29441 if (ctx->server_cert_type !=
29442 # 896 "ssl/ssl_lib.c" 3 4
29443 ((void *)0)
29444 # 896 "ssl/ssl_lib.c"
29445 ) {
29446 s->server_cert_type = CRYPTO_memdup((ctx->server_cert_type), ctx->server_cert_type_len, "ssl/ssl_lib.c", 897)
29447 ;
29448 if (s->server_cert_type ==
29449 # 899 "ssl/ssl_lib.c" 3 4
29450 ((void *)0)
29451 # 899 "ssl/ssl_lib.c"
29452 )
29453 goto sslerr;
29454 s->server_cert_type_len = ctx->server_cert_type_len;
29455 }
29456
29457
29458 if (!SSL_set_ct_validation_callback(ssl, ctx->ct_validation_callback,
29459 ctx->ct_validation_callback_arg))
29460 goto sslerr;
29461
29462
29463 s->ssl_pkey_num = 9 + ctx->sigalg_list_len;
29464 return ssl;
29465 cerr:
29466 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",913,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
29467 # 913 "ssl/ssl_lib.c" 3 4
29468 ((void *)0)
29469 # 913 "ssl/ssl_lib.c"
29470 );
29471 goto err;
29472 asn1err:
29473 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",916,__func__), ERR_set_error)((20),((13 | (0x2 << 18L))),
29474 # 916 "ssl/ssl_lib.c" 3 4
29475 ((void *)0)
29476 # 916 "ssl/ssl_lib.c"
29477 );
29478 goto err;
29479 sslerr:
29480 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",919,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
29481 # 919 "ssl/ssl_lib.c" 3 4
29482 ((void *)0)
29483 # 919 "ssl/ssl_lib.c"
29484 );
29485 err:
29486 SSL_free(ssl);
29487 return
29488 # 922 "ssl/ssl_lib.c" 3 4
29489 ((void *)0)
29490 # 922 "ssl/ssl_lib.c"
29491 ;
29492 }
29493
29494 SSL *ossl_ssl_connection_new(SSL_CTX *ctx)
29495 {
29496 return ossl_ssl_connection_new_int(ctx, ctx->method);
29497 }
29498
29499 int SSL_is_dtls(const SSL *s)
29500 {
29501 SSL_CONNECTION *sc = ((s) ==
29502 # 932 "ssl/ssl_lib.c" 3 4
29503 ((void *)0)
29504 # 932 "ssl/ssl_lib.c"
29505 ?
29506 # 932 "ssl/ssl_lib.c" 3 4
29507 ((void *)0)
29508 # 932 "ssl/ssl_lib.c"
29509 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
29510 # 932 "ssl/ssl_lib.c" 3 4
29511 ((void *)0)
29512 # 932 "ssl/ssl_lib.c"
29513 )));
29514
29515
29516 if (s->type == 1 || s->type == 2)
29517 return 0;
29518
29519
29520 if (sc ==
29521 # 939 "ssl/ssl_lib.c" 3 4
29522 ((void *)0)
29523 # 939 "ssl/ssl_lib.c"
29524 )
29525 return 0;
29526
29527 return ((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) ? 1 : 0;
29528 }
29529
29530 int SSL_is_tls(const SSL *s)
29531 {
29532 SSL_CONNECTION *sc = ((s) ==
29533 # 947 "ssl/ssl_lib.c" 3 4
29534 ((void *)0)
29535 # 947 "ssl/ssl_lib.c"
29536 ?
29537 # 947 "ssl/ssl_lib.c" 3 4
29538 ((void *)0)
29539 # 947 "ssl/ssl_lib.c"
29540 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
29541 # 947 "ssl/ssl_lib.c" 3 4
29542 ((void *)0)
29543 # 947 "ssl/ssl_lib.c"
29544 )));
29545
29546
29547 if (s->type == 1 || s->type == 2)
29548 return 0;
29549
29550
29551 if (sc ==
29552 # 954 "ssl/ssl_lib.c" 3 4
29553 ((void *)0)
29554 # 954 "ssl/ssl_lib.c"
29555 )
29556 return 0;
29557
29558 return ((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) ? 0 : 1;
29559 }
29560
29561 int SSL_is_quic(const SSL *s)
29562 {
29563
29564 if (s->type == 1 || s->type == 2)
29565 return 1;
29566
29567 return 0;
29568 }
29569
29570 int SSL_up_ref(SSL *s)
29571 {
29572 int i;
29573
29574 if (CRYPTO_UP_REF(&s->references, &i) <= 0)
29575 return 0;
29576
29577 ((void)0);;
29578 ;
29579 return ((i > 1) ? 1 : 0);
29580 }
29581
29582 int SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx,
29583 unsigned int sid_ctx_len)
29584 {
29585 if (sid_ctx_len > 32) {
29586 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",985,__func__), ERR_set_error)((20),(273),
29587 # 985 "ssl/ssl_lib.c" 3 4
29588 ((void *)0)
29589 # 985 "ssl/ssl_lib.c"
29590 );
29591 return 0;
29592 }
29593 ctx->sid_ctx_length = sid_ctx_len;
29594 memcpy(ctx->sid_ctx, sid_ctx, sid_ctx_len);
29595
29596 return 1;
29597 }
29598
29599 int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx,
29600 unsigned int sid_ctx_len)
29601 {
29602 SSL_CONNECTION *sc = ((ssl) ==
29603 # 997 "ssl/ssl_lib.c" 3 4
29604 ((void *)0)
29605 # 997 "ssl/ssl_lib.c"
29606 ?
29607 # 997 "ssl/ssl_lib.c" 3 4
29608 ((void *)0)
29609 # 997 "ssl/ssl_lib.c"
29610 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls :
29611 # 997 "ssl/ssl_lib.c" 3 4
29612 ((void *)0)
29613 # 997 "ssl/ssl_lib.c"
29614 )));
29615
29616 if (sc ==
29617 # 999 "ssl/ssl_lib.c" 3 4
29618 ((void *)0)
29619 # 999 "ssl/ssl_lib.c"
29620 )
29621 return 0;
29622
29623 if (sid_ctx_len > 32) {
29624 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1003,__func__), ERR_set_error)((20),(273),
29625 # 1003 "ssl/ssl_lib.c" 3 4
29626 ((void *)0)
29627 # 1003 "ssl/ssl_lib.c"
29628 );
29629 return 0;
29630 }
29631 sc->sid_ctx_length = sid_ctx_len;
29632 memcpy(sc->sid_ctx, sid_ctx, sid_ctx_len);
29633
29634 return 1;
29635 }
29636
29637 int SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb)
29638 {
29639 if (!CRYPTO_THREAD_write_lock(ctx->lock))
29640 return 0;
29641 ctx->generate_session_id = cb;
29642 CRYPTO_THREAD_unlock(ctx->lock);
29643 return 1;
29644 }
29645
29646 int SSL_set_generate_session_id(SSL *ssl, GEN_SESSION_CB cb)
29647 {
29648 SSL_CONNECTION *sc = ((ssl) ==
29649 # 1023 "ssl/ssl_lib.c" 3 4
29650 ((void *)0)
29651 # 1023 "ssl/ssl_lib.c"
29652 ?
29653 # 1023 "ssl/ssl_lib.c" 3 4
29654 ((void *)0)
29655 # 1023 "ssl/ssl_lib.c"
29656 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls :
29657 # 1023 "ssl/ssl_lib.c" 3 4
29658 ((void *)0)
29659 # 1023 "ssl/ssl_lib.c"
29660 )));
29661
29662 if (sc ==
29663 # 1025 "ssl/ssl_lib.c" 3 4
29664 ((void *)0)
29665 # 1025 "ssl/ssl_lib.c"
29666 || !CRYPTO_THREAD_write_lock(ssl->lock))
29667 return 0;
29668 sc->generate_session_id = cb;
29669 CRYPTO_THREAD_unlock(ssl->lock);
29670 return 1;
29671 }
29672
29673 int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id,
29674 unsigned int id_len)
29675 {
29676
29677
29678
29679
29680
29681
29682
29683 SSL_SESSION r, *p;
29684 const SSL_CONNECTION *sc = ((ssl) ==
29685 # 1043 "ssl/ssl_lib.c" 3 4
29686 ((void *)0)
29687 # 1043 "ssl/ssl_lib.c"
29688 ?
29689 # 1043 "ssl/ssl_lib.c" 3 4
29690 ((void *)0)
29691 # 1043 "ssl/ssl_lib.c"
29692 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls :
29693 # 1043 "ssl/ssl_lib.c" 3 4
29694 ((void *)0)
29695 # 1043 "ssl/ssl_lib.c"
29696 )));
29697
29698 if (sc ==
29699 # 1045 "ssl/ssl_lib.c" 3 4
29700 ((void *)0)
29701 # 1045 "ssl/ssl_lib.c"
29702 || id_len > sizeof(r.session_id))
29703 return 0;
29704
29705 r.ssl_version = sc->version;
29706 r.session_id_length = id_len;
29707 memcpy(r.session_id, id, id_len);
29708
29709 if (!CRYPTO_THREAD_read_lock(sc->session_ctx->lock))
29710 return 0;
29711 p = lh_SSL_SESSION_retrieve(sc->session_ctx->sessions, &r);
29712 CRYPTO_THREAD_unlock(sc->session_ctx->lock);
29713 return (p !=
29714 # 1056 "ssl/ssl_lib.c" 3 4
29715 ((void *)0)
29716 # 1056 "ssl/ssl_lib.c"
29717 );
29718 }
29719
29720 int SSL_CTX_set_purpose(SSL_CTX *s, int purpose)
29721 {
29722 return X509_VERIFY_PARAM_set_purpose(s->param, purpose);
29723 }
29724
29725 int SSL_set_purpose(SSL *s, int purpose)
29726 {
29727 SSL_CONNECTION *sc = ((s) ==
29728 # 1066 "ssl/ssl_lib.c" 3 4
29729 ((void *)0)
29730 # 1066 "ssl/ssl_lib.c"
29731 ?
29732 # 1066 "ssl/ssl_lib.c" 3 4
29733 ((void *)0)
29734 # 1066 "ssl/ssl_lib.c"
29735 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
29736 # 1066 "ssl/ssl_lib.c" 3 4
29737 ((void *)0)
29738 # 1066 "ssl/ssl_lib.c"
29739 )));
29740
29741 if (sc ==
29742 # 1068 "ssl/ssl_lib.c" 3 4
29743 ((void *)0)
29744 # 1068 "ssl/ssl_lib.c"
29745 )
29746 return 0;
29747
29748 return X509_VERIFY_PARAM_set_purpose(sc->param, purpose);
29749 }
29750
29751 int SSL_CTX_set_trust(SSL_CTX *s, int trust)
29752 {
29753 return X509_VERIFY_PARAM_set_trust(s->param, trust);
29754 }
29755
29756 int SSL_set_trust(SSL *s, int trust)
29757 {
29758 SSL_CONNECTION *sc = ((s) ==
29759 # 1081 "ssl/ssl_lib.c" 3 4
29760 ((void *)0)
29761 # 1081 "ssl/ssl_lib.c"
29762 ?
29763 # 1081 "ssl/ssl_lib.c" 3 4
29764 ((void *)0)
29765 # 1081 "ssl/ssl_lib.c"
29766 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
29767 # 1081 "ssl/ssl_lib.c" 3 4
29768 ((void *)0)
29769 # 1081 "ssl/ssl_lib.c"
29770 )));
29771
29772 if (sc ==
29773 # 1083 "ssl/ssl_lib.c" 3 4
29774 ((void *)0)
29775 # 1083 "ssl/ssl_lib.c"
29776 )
29777 return 0;
29778
29779 return X509_VERIFY_PARAM_set_trust(sc->param, trust);
29780 }
29781
29782 int SSL_set1_host(SSL *s, const char *hostname)
29783 {
29784 SSL_CONNECTION *sc = ((s) ==
29785 # 1091 "ssl/ssl_lib.c" 3 4
29786 ((void *)0)
29787 # 1091 "ssl/ssl_lib.c"
29788 ?
29789 # 1091 "ssl/ssl_lib.c" 3 4
29790 ((void *)0)
29791 # 1091 "ssl/ssl_lib.c"
29792 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
29793 # 1091 "ssl/ssl_lib.c" 3 4
29794 ((void *)0)
29795 # 1091 "ssl/ssl_lib.c"
29796 )));
29797
29798 if (sc ==
29799 # 1093 "ssl/ssl_lib.c" 3 4
29800 ((void *)0)
29801 # 1093 "ssl/ssl_lib.c"
29802 )
29803 return 0;
29804
29805
29806
29807 if (hostname !=
29808 # 1098 "ssl/ssl_lib.c" 3 4
29809 ((void *)0)
29810
29811 # 1099 "ssl/ssl_lib.c"
29812 && X509_VERIFY_PARAM_set1_ip_asc(sc->param, hostname) == 1)
29813 return 1;
29814
29815 return X509_VERIFY_PARAM_set1_host(sc->param, hostname, 0);
29816 }
29817
29818 int SSL_add1_host(SSL *s, const char *hostname)
29819 {
29820 SSL_CONNECTION *sc = ((s) ==
29821 # 1107 "ssl/ssl_lib.c" 3 4
29822 ((void *)0)
29823 # 1107 "ssl/ssl_lib.c"
29824 ?
29825 # 1107 "ssl/ssl_lib.c" 3 4
29826 ((void *)0)
29827 # 1107 "ssl/ssl_lib.c"
29828 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
29829 # 1107 "ssl/ssl_lib.c" 3 4
29830 ((void *)0)
29831 # 1107 "ssl/ssl_lib.c"
29832 )));
29833
29834 if (sc ==
29835 # 1109 "ssl/ssl_lib.c" 3 4
29836 ((void *)0)
29837 # 1109 "ssl/ssl_lib.c"
29838 )
29839 return 0;
29840
29841
29842
29843 if (hostname)
29844 {
29845 ASN1_OCTET_STRING *ip;
29846 char *old_ip;
29847
29848 ip = a2i_IPADDRESS(hostname);
29849 if (ip) {
29850
29851 ASN1_OCTET_STRING_free(ip);
29852
29853 old_ip = X509_VERIFY_PARAM_get1_ip_asc(sc->param);
29854 if (old_ip)
29855 {
29856 CRYPTO_free(old_ip, "ssl/ssl_lib.c", 1127);
29857
29858 return 0;
29859 }
29860
29861 return X509_VERIFY_PARAM_set1_ip_asc(sc->param, hostname);
29862 }
29863 }
29864
29865 return X509_VERIFY_PARAM_add1_host(sc->param, hostname, 0);
29866 }
29867
29868 void SSL_set_hostflags(SSL *s, unsigned int flags)
29869 {
29870 SSL_CONNECTION *sc = ((s) ==
29871 # 1141 "ssl/ssl_lib.c" 3 4
29872 ((void *)0)
29873 # 1141 "ssl/ssl_lib.c"
29874 ?
29875 # 1141 "ssl/ssl_lib.c" 3 4
29876 ((void *)0)
29877 # 1141 "ssl/ssl_lib.c"
29878 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
29879 # 1141 "ssl/ssl_lib.c" 3 4
29880 ((void *)0)
29881 # 1141 "ssl/ssl_lib.c"
29882 )));
29883
29884 if (sc ==
29885 # 1143 "ssl/ssl_lib.c" 3 4
29886 ((void *)0)
29887 # 1143 "ssl/ssl_lib.c"
29888 )
29889 return;
29890
29891 X509_VERIFY_PARAM_set_hostflags(sc->param, flags);
29892 }
29893
29894 const char *SSL_get0_peername(SSL *s)
29895 {
29896 SSL_CONNECTION *sc = ((s) ==
29897 # 1151 "ssl/ssl_lib.c" 3 4
29898 ((void *)0)
29899 # 1151 "ssl/ssl_lib.c"
29900 ?
29901 # 1151 "ssl/ssl_lib.c" 3 4
29902 ((void *)0)
29903 # 1151 "ssl/ssl_lib.c"
29904 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
29905 # 1151 "ssl/ssl_lib.c" 3 4
29906 ((void *)0)
29907 # 1151 "ssl/ssl_lib.c"
29908 )));
29909
29910 if (sc ==
29911 # 1153 "ssl/ssl_lib.c" 3 4
29912 ((void *)0)
29913 # 1153 "ssl/ssl_lib.c"
29914 )
29915 return
29916 # 1154 "ssl/ssl_lib.c" 3 4
29917 ((void *)0)
29918 # 1154 "ssl/ssl_lib.c"
29919 ;
29920
29921 return X509_VERIFY_PARAM_get0_peername(sc->param);
29922 }
29923
29924 int SSL_CTX_dane_enable(SSL_CTX *ctx)
29925 {
29926 return dane_ctx_enable(&ctx->dane);
29927 }
29928
29929 unsigned long SSL_CTX_dane_set_flags(SSL_CTX *ctx, unsigned long flags)
29930 {
29931 unsigned long orig = ctx->dane.flags;
29932
29933 ctx->dane.flags |= flags;
29934 return orig;
29935 }
29936
29937 unsigned long SSL_CTX_dane_clear_flags(SSL_CTX *ctx, unsigned long flags)
29938 {
29939 unsigned long orig = ctx->dane.flags;
29940
29941 ctx->dane.flags &= ~flags;
29942 return orig;
29943 }
29944
29945 int SSL_dane_enable(SSL *s, const char *basedomain)
29946 {
29947 SSL_DANE *dane;
29948 SSL_CONNECTION *sc = ((s) ==
29949 # 1183 "ssl/ssl_lib.c" 3 4
29950 ((void *)0)
29951 # 1183 "ssl/ssl_lib.c"
29952 ?
29953 # 1183 "ssl/ssl_lib.c" 3 4
29954 ((void *)0)
29955 # 1183 "ssl/ssl_lib.c"
29956 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
29957 # 1183 "ssl/ssl_lib.c" 3 4
29958 ((void *)0)
29959 # 1183 "ssl/ssl_lib.c"
29960 )));
29961
29962 if (sc ==
29963 # 1185 "ssl/ssl_lib.c" 3 4
29964 ((void *)0)
29965 # 1185 "ssl/ssl_lib.c"
29966 )
29967 return 0;
29968
29969 dane = &sc->dane;
29970 if (s->ctx->dane.mdmax == 0) {
29971 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1190,__func__), ERR_set_error)((20),(167),
29972 # 1190 "ssl/ssl_lib.c" 3 4
29973 ((void *)0)
29974 # 1190 "ssl/ssl_lib.c"
29975 );
29976 return 0;
29977 }
29978 if (dane->trecs !=
29979 # 1193 "ssl/ssl_lib.c" 3 4
29980 ((void *)0)
29981 # 1193 "ssl/ssl_lib.c"
29982 ) {
29983 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1194,__func__), ERR_set_error)((20),(172),
29984 # 1194 "ssl/ssl_lib.c" 3 4
29985 ((void *)0)
29986 # 1194 "ssl/ssl_lib.c"
29987 );
29988 return 0;
29989 }
29990
29991
29992
29993
29994
29995
29996 if (sc->ext.hostname ==
29997 # 1203 "ssl/ssl_lib.c" 3 4
29998 ((void *)0)
29999 # 1203 "ssl/ssl_lib.c"
30000 ) {
30001 if (!SSL_ctrl(s,55,0, (void *)basedomain)) {
30002 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1205,__func__), ERR_set_error)((20),(204),
30003 # 1205 "ssl/ssl_lib.c" 3 4
30004 ((void *)0)
30005 # 1205 "ssl/ssl_lib.c"
30006 );
30007 return -1;
30008 }
30009 }
30010
30011
30012 if (!X509_VERIFY_PARAM_set1_host(sc->param, basedomain, 0)) {
30013 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1212,__func__), ERR_set_error)((20),(204),
30014 # 1212 "ssl/ssl_lib.c" 3 4
30015 ((void *)0)
30016 # 1212 "ssl/ssl_lib.c"
30017 );
30018 return -1;
30019 }
30020
30021 dane->mdpth = -1;
30022 dane->pdpth = -1;
30023 dane->dctx = &s->ctx->dane;
30024 dane->trecs = sk_danetls_record_new_null();
30025
30026 if (dane->trecs ==
30027 # 1221 "ssl/ssl_lib.c" 3 4
30028 ((void *)0)
30029 # 1221 "ssl/ssl_lib.c"
30030 ) {
30031 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1222,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
30032 # 1222 "ssl/ssl_lib.c" 3 4
30033 ((void *)0)
30034 # 1222 "ssl/ssl_lib.c"
30035 );
30036 return -1;
30037 }
30038 return 1;
30039 }
30040
30041 unsigned long SSL_dane_set_flags(SSL *ssl, unsigned long flags)
30042 {
30043 unsigned long orig;
30044 SSL_CONNECTION *sc = ((ssl) ==
30045 # 1231 "ssl/ssl_lib.c" 3 4
30046 ((void *)0)
30047 # 1231 "ssl/ssl_lib.c"
30048 ?
30049 # 1231 "ssl/ssl_lib.c" 3 4
30050 ((void *)0)
30051 # 1231 "ssl/ssl_lib.c"
30052 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls :
30053 # 1231 "ssl/ssl_lib.c" 3 4
30054 ((void *)0)
30055 # 1231 "ssl/ssl_lib.c"
30056 )));
30057
30058 if (sc ==
30059 # 1233 "ssl/ssl_lib.c" 3 4
30060 ((void *)0)
30061 # 1233 "ssl/ssl_lib.c"
30062 )
30063 return 0;
30064
30065 orig = sc->dane.flags;
30066
30067 sc->dane.flags |= flags;
30068 return orig;
30069 }
30070
30071 unsigned long SSL_dane_clear_flags(SSL *ssl, unsigned long flags)
30072 {
30073 unsigned long orig;
30074 SSL_CONNECTION *sc = ((ssl) ==
30075 # 1245 "ssl/ssl_lib.c" 3 4
30076 ((void *)0)
30077 # 1245 "ssl/ssl_lib.c"
30078 ?
30079 # 1245 "ssl/ssl_lib.c" 3 4
30080 ((void *)0)
30081 # 1245 "ssl/ssl_lib.c"
30082 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls :
30083 # 1245 "ssl/ssl_lib.c" 3 4
30084 ((void *)0)
30085 # 1245 "ssl/ssl_lib.c"
30086 )));
30087
30088 if (sc ==
30089 # 1247 "ssl/ssl_lib.c" 3 4
30090 ((void *)0)
30091 # 1247 "ssl/ssl_lib.c"
30092 )
30093 return 0;
30094
30095 orig = sc->dane.flags;
30096
30097 sc->dane.flags &= ~flags;
30098 return orig;
30099 }
30100
30101 int SSL_get0_dane_authority(SSL *s, X509 **mcert, EVP_PKEY **mspki)
30102 {
30103 SSL_DANE *dane;
30104 SSL_CONNECTION *sc = ((s) ==
30105 # 1259 "ssl/ssl_lib.c" 3 4
30106 ((void *)0)
30107 # 1259 "ssl/ssl_lib.c"
30108 ?
30109 # 1259 "ssl/ssl_lib.c" 3 4
30110 ((void *)0)
30111 # 1259 "ssl/ssl_lib.c"
30112 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
30113 # 1259 "ssl/ssl_lib.c" 3 4
30114 ((void *)0)
30115 # 1259 "ssl/ssl_lib.c"
30116 )));
30117
30118 if (sc ==
30119 # 1261 "ssl/ssl_lib.c" 3 4
30120 ((void *)0)
30121 # 1261 "ssl/ssl_lib.c"
30122 )
30123 return -1;
30124
30125 dane = &sc->dane;
30126
30127 if (!((dane) !=
30128 # 1266 "ssl/ssl_lib.c" 3 4
30129 ((void *)0)
30130 # 1266 "ssl/ssl_lib.c"
30131 && sk_danetls_record_num((dane)->trecs) > 0) || sc->verify_result != 0)
30132 return -1;
30133 if (dane->mtlsa) {
30134 if (mcert)
30135 *mcert = dane->mcert;
30136 if (mspki)
30137 *mspki = (dane->mcert ==
30138 # 1272 "ssl/ssl_lib.c" 3 4
30139 ((void *)0)
30140 # 1272 "ssl/ssl_lib.c"
30141 ) ? dane->mtlsa->spki :
30142 # 1272 "ssl/ssl_lib.c" 3 4
30143 ((void *)0)
30144 # 1272 "ssl/ssl_lib.c"
30145 ;
30146 }
30147 return dane->mdpth;
30148 }
30149
30150 int SSL_get0_dane_tlsa(SSL *s, uint8_t *usage, uint8_t *selector,
30151 uint8_t *mtype, const unsigned char **data, size_t *dlen)
30152 {
30153 SSL_DANE *dane;
30154 SSL_CONNECTION *sc = ((s) ==
30155 # 1281 "ssl/ssl_lib.c" 3 4
30156 ((void *)0)
30157 # 1281 "ssl/ssl_lib.c"
30158 ?
30159 # 1281 "ssl/ssl_lib.c" 3 4
30160 ((void *)0)
30161 # 1281 "ssl/ssl_lib.c"
30162 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
30163 # 1281 "ssl/ssl_lib.c" 3 4
30164 ((void *)0)
30165 # 1281 "ssl/ssl_lib.c"
30166 )));
30167
30168 if (sc ==
30169 # 1283 "ssl/ssl_lib.c" 3 4
30170 ((void *)0)
30171 # 1283 "ssl/ssl_lib.c"
30172 )
30173 return -1;
30174
30175 dane = &sc->dane;
30176
30177 if (!((dane) !=
30178 # 1288 "ssl/ssl_lib.c" 3 4
30179 ((void *)0)
30180 # 1288 "ssl/ssl_lib.c"
30181 && sk_danetls_record_num((dane)->trecs) > 0) || sc->verify_result != 0)
30182 return -1;
30183 if (dane->mtlsa) {
30184 if (usage)
30185 *usage = dane->mtlsa->usage;
30186 if (selector)
30187 *selector = dane->mtlsa->selector;
30188 if (mtype)
30189 *mtype = dane->mtlsa->mtype;
30190 if (data)
30191 *data = dane->mtlsa->data;
30192 if (dlen)
30193 *dlen = dane->mtlsa->dlen;
30194 }
30195 return dane->mdpth;
30196 }
30197
30198 SSL_DANE *SSL_get0_dane(SSL *s)
30199 {
30200 SSL_CONNECTION *sc = ((s) ==
30201 # 1307 "ssl/ssl_lib.c" 3 4
30202 ((void *)0)
30203 # 1307 "ssl/ssl_lib.c"
30204 ?
30205 # 1307 "ssl/ssl_lib.c" 3 4
30206 ((void *)0)
30207 # 1307 "ssl/ssl_lib.c"
30208 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
30209 # 1307 "ssl/ssl_lib.c" 3 4
30210 ((void *)0)
30211 # 1307 "ssl/ssl_lib.c"
30212 )));
30213
30214 if (sc ==
30215 # 1309 "ssl/ssl_lib.c" 3 4
30216 ((void *)0)
30217 # 1309 "ssl/ssl_lib.c"
30218 )
30219 return
30220 # 1310 "ssl/ssl_lib.c" 3 4
30221 ((void *)0)
30222 # 1310 "ssl/ssl_lib.c"
30223 ;
30224
30225 return &sc->dane;
30226 }
30227
30228 int SSL_dane_tlsa_add(SSL *s, uint8_t usage, uint8_t selector,
30229 uint8_t mtype, const unsigned char *data, size_t dlen)
30230 {
30231 SSL_CONNECTION *sc = ((s) ==
30232 # 1318 "ssl/ssl_lib.c" 3 4
30233 ((void *)0)
30234 # 1318 "ssl/ssl_lib.c"
30235 ?
30236 # 1318 "ssl/ssl_lib.c" 3 4
30237 ((void *)0)
30238 # 1318 "ssl/ssl_lib.c"
30239 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
30240 # 1318 "ssl/ssl_lib.c" 3 4
30241 ((void *)0)
30242 # 1318 "ssl/ssl_lib.c"
30243 )));
30244
30245 if (sc ==
30246 # 1320 "ssl/ssl_lib.c" 3 4
30247 ((void *)0)
30248 # 1320 "ssl/ssl_lib.c"
30249 )
30250 return 0;
30251
30252 return dane_tlsa_add(&sc->dane, usage, selector, mtype, data, dlen);
30253 }
30254
30255 int SSL_CTX_dane_mtype_set(SSL_CTX *ctx, const EVP_MD *md, uint8_t mtype,
30256 uint8_t ord)
30257 {
30258 return dane_mtype_set(&ctx->dane, md, mtype, ord);
30259 }
30260
30261 int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm)
30262 {
30263 return X509_VERIFY_PARAM_set1(ctx->param, vpm);
30264 }
30265
30266 int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm)
30267 {
30268 SSL_CONNECTION *sc = ((ssl) ==
30269 # 1339 "ssl/ssl_lib.c" 3 4
30270 ((void *)0)
30271 # 1339 "ssl/ssl_lib.c"
30272 ?
30273 # 1339 "ssl/ssl_lib.c" 3 4
30274 ((void *)0)
30275 # 1339 "ssl/ssl_lib.c"
30276 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls :
30277 # 1339 "ssl/ssl_lib.c" 3 4
30278 ((void *)0)
30279 # 1339 "ssl/ssl_lib.c"
30280 )));
30281
30282 if (sc ==
30283 # 1341 "ssl/ssl_lib.c" 3 4
30284 ((void *)0)
30285 # 1341 "ssl/ssl_lib.c"
30286 )
30287 return 0;
30288
30289 return X509_VERIFY_PARAM_set1(sc->param, vpm);
30290 }
30291
30292 X509_VERIFY_PARAM *SSL_CTX_get0_param(SSL_CTX *ctx)
30293 {
30294 return ctx->param;
30295 }
30296
30297 X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl)
30298 {
30299 SSL_CONNECTION *sc = ((ssl) ==
30300 # 1354 "ssl/ssl_lib.c" 3 4
30301 ((void *)0)
30302 # 1354 "ssl/ssl_lib.c"
30303 ?
30304 # 1354 "ssl/ssl_lib.c" 3 4
30305 ((void *)0)
30306 # 1354 "ssl/ssl_lib.c"
30307 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls :
30308 # 1354 "ssl/ssl_lib.c" 3 4
30309 ((void *)0)
30310 # 1354 "ssl/ssl_lib.c"
30311 )));
30312
30313 if (sc ==
30314 # 1356 "ssl/ssl_lib.c" 3 4
30315 ((void *)0)
30316 # 1356 "ssl/ssl_lib.c"
30317 )
30318 return
30319 # 1357 "ssl/ssl_lib.c" 3 4
30320 ((void *)0)
30321 # 1357 "ssl/ssl_lib.c"
30322 ;
30323
30324 return sc->param;
30325 }
30326
30327 void SSL_certs_clear(SSL *s)
30328 {
30329 SSL_CONNECTION *sc = ((s) ==
30330 # 1364 "ssl/ssl_lib.c" 3 4
30331 ((void *)0)
30332 # 1364 "ssl/ssl_lib.c"
30333 ?
30334 # 1364 "ssl/ssl_lib.c" 3 4
30335 ((void *)0)
30336 # 1364 "ssl/ssl_lib.c"
30337 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
30338 # 1364 "ssl/ssl_lib.c" 3 4
30339 ((void *)0)
30340 # 1364 "ssl/ssl_lib.c"
30341 )));
30342
30343 if (sc ==
30344 # 1366 "ssl/ssl_lib.c" 3 4
30345 ((void *)0)
30346 # 1366 "ssl/ssl_lib.c"
30347 )
30348 return;
30349
30350 ssl_cert_clear_certs(sc->cert);
30351 }
30352
30353 void SSL_free(SSL *s)
30354 {
30355 int i;
30356
30357 if (s ==
30358 # 1376 "ssl/ssl_lib.c" 3 4
30359 ((void *)0)
30360 # 1376 "ssl/ssl_lib.c"
30361 )
30362 return;
30363 CRYPTO_DOWN_REF(&s->references, &i);
30364 ((void)0);;
30365 if (i > 0)
30366 return;
30367 ;
30368
30369 CRYPTO_free_ex_data(0, s, &s->ex_data);
30370
30371 if (s->method !=
30372 # 1386 "ssl/ssl_lib.c" 3 4
30373 ((void *)0)
30374 # 1386 "ssl/ssl_lib.c"
30375 )
30376 s->method->ssl_free(s);
30377
30378 SSL_CTX_free(s->ctx);
30379 CRYPTO_THREAD_lock_free(s->lock);
30380 CRYPTO_FREE_REF(&s->references);
30381
30382 CRYPTO_free(s, "ssl/ssl_lib.c", 1393);
30383 }
30384
30385 void ossl_ssl_connection_free(SSL *ssl)
30386 {
30387 SSL_CONNECTION *s;
30388
30389 s = ((ssl) ==
30390 # 1400 "ssl/ssl_lib.c" 3 4
30391 ((void *)0)
30392 # 1400 "ssl/ssl_lib.c"
30393 ?
30394 # 1400 "ssl/ssl_lib.c" 3 4
30395 ((void *)0)
30396 # 1400 "ssl/ssl_lib.c"
30397 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) :
30398 # 1400 "ssl/ssl_lib.c" 3 4
30399 ((void *)0)
30400 # 1400 "ssl/ssl_lib.c"
30401 ));
30402 if (s ==
30403 # 1401 "ssl/ssl_lib.c" 3 4
30404 ((void *)0)
30405 # 1401 "ssl/ssl_lib.c"
30406 )
30407 return;
30408
30409 X509_VERIFY_PARAM_free(s->param);
30410 dane_final(&s->dane);
30411
30412
30413 ssl_free_wbio_buffer(s);
30414
30415
30416 RECORD_LAYER_clear(&s->rlayer);
30417
30418 BUF_MEM_free(s->init_buf);
30419
30420
30421 OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(s->cipher_list));
30422 OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(s->cipher_list_by_id));
30423 OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(s->tls13_ciphersuites));
30424 OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(s->peer_ciphers));
30425
30426
30427 if (s->session !=
30428 # 1422 "ssl/ssl_lib.c" 3 4
30429 ((void *)0)
30430 # 1422 "ssl/ssl_lib.c"
30431 ) {
30432 ssl_clear_bad_session(s);
30433 SSL_SESSION_free(s->session);
30434 }
30435 SSL_SESSION_free(s->psksession);
30436 CRYPTO_free(s->psksession_id, "ssl/ssl_lib.c", 1427);
30437
30438 ssl_cert_free(s->cert);
30439 CRYPTO_free(s->shared_sigalgs, "ssl/ssl_lib.c", 1430);
30440
30441
30442 CRYPTO_free(s->ext.hostname, "ssl/ssl_lib.c", 1433);
30443 SSL_CTX_free(s->session_ctx);
30444 CRYPTO_free(s->ext.ecpointformats, "ssl/ssl_lib.c", 1435);
30445 CRYPTO_free(s->ext.peer_ecpointformats, "ssl/ssl_lib.c", 1436);
30446 CRYPTO_free(s->ext.supportedgroups, "ssl/ssl_lib.c", 1437);
30447 CRYPTO_free(s->ext.peer_supportedgroups, "ssl/ssl_lib.c", 1438);
30448 OPENSSL_sk_pop_free(ossl_check_X509_EXTENSION_sk_type(s->ext.ocsp.exts),ossl_check_X509_EXTENSION_freefunc_type(X509_EXTENSION_free));
30449
30450 OPENSSL_sk_pop_free(ossl_check_OCSP_RESPID_sk_type(s->ext.ocsp.ids),ossl_check_OCSP_RESPID_freefunc_type(OCSP_RESPID_free));
30451
30452
30453 SCT_LIST_free(s->scts);
30454 CRYPTO_free(s->ext.scts, "ssl/ssl_lib.c", 1445);
30455
30456 CRYPTO_free(s->ext.ocsp.resp, "ssl/ssl_lib.c", 1447);
30457 CRYPTO_free(s->ext.alpn, "ssl/ssl_lib.c", 1448);
30458 CRYPTO_free(s->ext.tls13_cookie, "ssl/ssl_lib.c", 1449);
30459 if (s->clienthello !=
30460 # 1450 "ssl/ssl_lib.c" 3 4
30461 ((void *)0)
30462 # 1450 "ssl/ssl_lib.c"
30463 )
30464 CRYPTO_free(s->clienthello->pre_proc_exts, "ssl/ssl_lib.c", 1451);
30465 CRYPTO_free(s->clienthello, "ssl/ssl_lib.c", 1452);
30466 CRYPTO_free(s->pha_context, "ssl/ssl_lib.c", 1453);
30467 EVP_MD_CTX_free(s->pha_dgst);
30468
30469 OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(s->ca_names),ossl_check_X509_NAME_freefunc_type(X509_NAME_free));
30470 OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(s->client_ca_names),ossl_check_X509_NAME_freefunc_type(X509_NAME_free));
30471
30472 CRYPTO_free(s->client_cert_type, "ssl/ssl_lib.c", 1459);
30473 CRYPTO_free(s->server_cert_type, "ssl/ssl_lib.c", 1460);
30474
30475 OSSL_STACK_OF_X509_free(s->verified_chain);
30476
30477 if (ssl->method !=
30478 # 1464 "ssl/ssl_lib.c" 3 4
30479 ((void *)0)
30480 # 1464 "ssl/ssl_lib.c"
30481 )
30482 ssl->method->ssl_deinit(ssl);
30483
30484 ASYNC_WAIT_CTX_free(s->waitctx);
30485
30486
30487 CRYPTO_free(s->ext.npn, "ssl/ssl_lib.c", 1470);
30488
30489
30490
30491 OPENSSL_sk_free(ossl_check_SRTP_PROTECTION_PROFILE_sk_type(s->srtp_profiles));
30492 # 1483 "ssl/ssl_lib.c"
30493 BIO_free_all(s->wbio);
30494 s->wbio =
30495 # 1484 "ssl/ssl_lib.c" 3 4
30496 ((void *)0)
30497 # 1484 "ssl/ssl_lib.c"
30498 ;
30499 BIO_free_all(s->rbio);
30500 s->rbio =
30501 # 1486 "ssl/ssl_lib.c" 3 4
30502 ((void *)0)
30503 # 1486 "ssl/ssl_lib.c"
30504 ;
30505 CRYPTO_free(s->s3.tmp.valid_flags, "ssl/ssl_lib.c", 1487);
30506 }
30507
30508 void SSL_set0_rbio(SSL *s, BIO *rbio)
30509 {
30510 SSL_CONNECTION *sc = ((s) ==
30511 # 1492 "ssl/ssl_lib.c" 3 4
30512 ((void *)0)
30513 # 1492 "ssl/ssl_lib.c"
30514 ?
30515 # 1492 "ssl/ssl_lib.c" 3 4
30516 ((void *)0)
30517 # 1492 "ssl/ssl_lib.c"
30518 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
30519 # 1492 "ssl/ssl_lib.c" 3 4
30520 ((void *)0)
30521 # 1492 "ssl/ssl_lib.c"
30522 )));
30523
30524
30525 if (((s) !=
30526 # 1495 "ssl/ssl_lib.c" 3 4
30527 ((void *)0)
30528 # 1495 "ssl/ssl_lib.c"
30529 && ((s)->type == 1 || (s)->type == 2))) {
30530 ossl_quic_conn_set0_net_rbio(s, rbio);
30531 return;
30532 }
30533
30534
30535 if (sc ==
30536 # 1501 "ssl/ssl_lib.c" 3 4
30537 ((void *)0)
30538 # 1501 "ssl/ssl_lib.c"
30539 )
30540 return;
30541
30542 BIO_free_all(sc->rbio);
30543 sc->rbio = rbio;
30544 sc->rlayer.rrlmethod->set1_bio(sc->rlayer.rrl, sc->rbio);
30545 }
30546
30547 void SSL_set0_wbio(SSL *s, BIO *wbio)
30548 {
30549 SSL_CONNECTION *sc = ((s) ==
30550 # 1511 "ssl/ssl_lib.c" 3 4
30551 ((void *)0)
30552 # 1511 "ssl/ssl_lib.c"
30553 ?
30554 # 1511 "ssl/ssl_lib.c" 3 4
30555 ((void *)0)
30556 # 1511 "ssl/ssl_lib.c"
30557 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
30558 # 1511 "ssl/ssl_lib.c" 3 4
30559 ((void *)0)
30560 # 1511 "ssl/ssl_lib.c"
30561 )));
30562
30563
30564 if (((s) !=
30565 # 1514 "ssl/ssl_lib.c" 3 4
30566 ((void *)0)
30567 # 1514 "ssl/ssl_lib.c"
30568 && ((s)->type == 1 || (s)->type == 2))) {
30569 ossl_quic_conn_set0_net_wbio(s, wbio);
30570 return;
30571 }
30572
30573
30574 if (sc ==
30575 # 1520 "ssl/ssl_lib.c" 3 4
30576 ((void *)0)
30577 # 1520 "ssl/ssl_lib.c"
30578 )
30579 return;
30580
30581
30582
30583
30584 if (sc->bbio !=
30585 # 1526 "ssl/ssl_lib.c" 3 4
30586 ((void *)0)
30587 # 1526 "ssl/ssl_lib.c"
30588 )
30589 sc->wbio = BIO_pop(sc->wbio);
30590
30591 BIO_free_all(sc->wbio);
30592 sc->wbio = wbio;
30593
30594
30595 if (sc->bbio !=
30596 # 1533 "ssl/ssl_lib.c" 3 4
30597 ((void *)0)
30598 # 1533 "ssl/ssl_lib.c"
30599 )
30600 sc->wbio = BIO_push(sc->bbio, sc->wbio);
30601
30602 sc->rlayer.wrlmethod->set1_bio(sc->rlayer.wrl, sc->wbio);
30603 }
30604
30605 void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio)
30606 {
30607
30608
30609
30610
30611
30612
30613 if (rbio == SSL_get_rbio(s) && wbio == SSL_get_wbio(s))
30614 return;
30615
30616
30617
30618
30619
30620 if (rbio !=
30621 # 1554 "ssl/ssl_lib.c" 3 4
30622 ((void *)0)
30623 # 1554 "ssl/ssl_lib.c"
30624 && rbio == wbio)
30625 BIO_up_ref(rbio);
30626
30627
30628
30629
30630 if (rbio == SSL_get_rbio(s)) {
30631 SSL_set0_wbio(s, wbio);
30632 return;
30633 }
30634
30635
30636
30637
30638
30639 if (wbio == SSL_get_wbio(s) && SSL_get_rbio(s) != SSL_get_wbio(s)) {
30640 SSL_set0_rbio(s, rbio);
30641 return;
30642 }
30643
30644
30645 SSL_set0_rbio(s, rbio);
30646 SSL_set0_wbio(s, wbio);
30647 }
30648
30649 BIO *SSL_get_rbio(const SSL *s)
30650 {
30651 const SSL_CONNECTION *sc = ((s) ==
30652 # 1581 "ssl/ssl_lib.c" 3 4
30653 ((void *)0)
30654 # 1581 "ssl/ssl_lib.c"
30655 ?
30656 # 1581 "ssl/ssl_lib.c" 3 4
30657 ((void *)0)
30658 # 1581 "ssl/ssl_lib.c"
30659 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
30660 # 1581 "ssl/ssl_lib.c" 3 4
30661 ((void *)0)
30662 # 1581 "ssl/ssl_lib.c"
30663 )));
30664
30665
30666 if (((s) !=
30667 # 1584 "ssl/ssl_lib.c" 3 4
30668 ((void *)0)
30669 # 1584 "ssl/ssl_lib.c"
30670 && ((s)->type == 1 || (s)->type == 2)))
30671 return ossl_quic_conn_get_net_rbio(s);
30672
30673
30674 if (sc ==
30675 # 1588 "ssl/ssl_lib.c" 3 4
30676 ((void *)0)
30677 # 1588 "ssl/ssl_lib.c"
30678 )
30679 return
30680 # 1589 "ssl/ssl_lib.c" 3 4
30681 ((void *)0)
30682 # 1589 "ssl/ssl_lib.c"
30683 ;
30684
30685 return sc->rbio;
30686 }
30687
30688 BIO *SSL_get_wbio(const SSL *s)
30689 {
30690 const SSL_CONNECTION *sc = ((s) ==
30691 # 1596 "ssl/ssl_lib.c" 3 4
30692 ((void *)0)
30693 # 1596 "ssl/ssl_lib.c"
30694 ?
30695 # 1596 "ssl/ssl_lib.c" 3 4
30696 ((void *)0)
30697 # 1596 "ssl/ssl_lib.c"
30698 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
30699 # 1596 "ssl/ssl_lib.c" 3 4
30700 ((void *)0)
30701 # 1596 "ssl/ssl_lib.c"
30702 )));
30703
30704
30705 if (((s) !=
30706 # 1599 "ssl/ssl_lib.c" 3 4
30707 ((void *)0)
30708 # 1599 "ssl/ssl_lib.c"
30709 && ((s)->type == 1 || (s)->type == 2)))
30710 return ossl_quic_conn_get_net_wbio(s);
30711
30712
30713 if (sc ==
30714 # 1603 "ssl/ssl_lib.c" 3 4
30715 ((void *)0)
30716 # 1603 "ssl/ssl_lib.c"
30717 )
30718 return
30719 # 1604 "ssl/ssl_lib.c" 3 4
30720 ((void *)0)
30721 # 1604 "ssl/ssl_lib.c"
30722 ;
30723
30724 if (sc->bbio !=
30725 # 1606 "ssl/ssl_lib.c" 3 4
30726 ((void *)0)
30727 # 1606 "ssl/ssl_lib.c"
30728 ) {
30729
30730
30731
30732
30733 return BIO_next(sc->bbio);
30734 }
30735 return sc->wbio;
30736 }
30737
30738 int SSL_get_fd(const SSL *s)
30739 {
30740 return SSL_get_rfd(s);
30741 }
30742
30743 int SSL_get_rfd(const SSL *s)
30744 {
30745 int ret = -1;
30746 BIO *b, *r;
30747
30748 b = SSL_get_rbio(s);
30749 r = BIO_find_type(b, 0x0100);
30750 if (r !=
30751 # 1628 "ssl/ssl_lib.c" 3 4
30752 ((void *)0)
30753 # 1628 "ssl/ssl_lib.c"
30754 )
30755 BIO_ctrl(r,105,0,(char *)(&ret));
30756 return ret;
30757 }
30758
30759 int SSL_get_wfd(const SSL *s)
30760 {
30761 int ret = -1;
30762 BIO *b, *r;
30763
30764 b = SSL_get_wbio(s);
30765 r = BIO_find_type(b, 0x0100);
30766 if (r !=
30767 # 1640 "ssl/ssl_lib.c" 3 4
30768 ((void *)0)
30769 # 1640 "ssl/ssl_lib.c"
30770 )
30771 BIO_ctrl(r,105,0,(char *)(&ret));
30772 return ret;
30773 }
30774
30775
30776 static const BIO_METHOD *fd_method(SSL *s)
30777 {
30778
30779 if (((s) !=
30780 # 1649 "ssl/ssl_lib.c" 3 4
30781 ((void *)0)
30782 # 1649 "ssl/ssl_lib.c"
30783 && ((s)->type == 1 || (s)->type == 2)))
30784 return BIO_s_datagram();
30785
30786
30787 return BIO_s_socket();
30788 }
30789
30790 int SSL_set_fd(SSL *s, int fd)
30791 {
30792 int ret = 0;
30793 BIO *bio =
30794 # 1659 "ssl/ssl_lib.c" 3 4
30795 ((void *)0)
30796 # 1659 "ssl/ssl_lib.c"
30797 ;
30798
30799 if (s->type == 2) {
30800 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1662,__func__), ERR_set_error)((20),(356),
30801 # 1662 "ssl/ssl_lib.c" 3 4
30802 ((void *)0)
30803 # 1662 "ssl/ssl_lib.c"
30804 );
30805 goto err;
30806 }
30807
30808 bio = BIO_new(fd_method(s));
30809
30810 if (bio ==
30811 # 1668 "ssl/ssl_lib.c" 3 4
30812 ((void *)0)
30813 # 1668 "ssl/ssl_lib.c"
30814 ) {
30815 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1669,__func__), ERR_set_error)((20),((7 | (0x2 << 18L))),
30816 # 1669 "ssl/ssl_lib.c" 3 4
30817 ((void *)0)
30818 # 1669 "ssl/ssl_lib.c"
30819 );
30820 goto err;
30821 }
30822 BIO_int_ctrl(bio,104,0x00,fd);
30823 SSL_set_bio(s, bio, bio);
30824 # 1683 "ssl/ssl_lib.c"
30825 ret = 1;
30826 err:
30827 return ret;
30828 }
30829
30830 int SSL_set_wfd(SSL *s, int fd)
30831 {
30832 BIO *rbio = SSL_get_rbio(s);
30833 int desired_type = ((s) !=
30834 # 1691 "ssl/ssl_lib.c" 3 4
30835 ((void *)0)
30836 # 1691 "ssl/ssl_lib.c"
30837 && ((s)->type == 1 || (s)->type == 2)) ? (21|0x0400|0x0100) : ( 5|0x0400|0x0100);
30838
30839 if (s->type == 2) {
30840 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1694,__func__), ERR_set_error)((20),(356),
30841 # 1694 "ssl/ssl_lib.c" 3 4
30842 ((void *)0)
30843 # 1694 "ssl/ssl_lib.c"
30844 );
30845 return 0;
30846 }
30847
30848 if (rbio ==
30849 # 1698 "ssl/ssl_lib.c" 3 4
30850 ((void *)0)
30851 # 1698 "ssl/ssl_lib.c"
30852 || BIO_method_type(rbio) != desired_type
30853 || (int)BIO_ctrl(rbio,105,0,(char *)(
30854 # 1699 "ssl/ssl_lib.c" 3 4
30855 ((void *)0)
30856 # 1699 "ssl/ssl_lib.c"
30857 )) != fd) {
30858 BIO *bio = BIO_new(fd_method(s));
30859
30860 if (bio ==
30861 # 1702 "ssl/ssl_lib.c" 3 4
30862 ((void *)0)
30863 # 1702 "ssl/ssl_lib.c"
30864 ) {
30865 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1703,__func__), ERR_set_error)((20),((7 | (0x2 << 18L))),
30866 # 1703 "ssl/ssl_lib.c" 3 4
30867 ((void *)0)
30868 # 1703 "ssl/ssl_lib.c"
30869 );
30870 return 0;
30871 }
30872 BIO_int_ctrl(bio,104,0x00,fd);
30873 SSL_set0_wbio(s, bio);
30874 # 1717 "ssl/ssl_lib.c"
30875 } else {
30876 BIO_up_ref(rbio);
30877 SSL_set0_wbio(s, rbio);
30878 }
30879 return 1;
30880 }
30881
30882 int SSL_set_rfd(SSL *s, int fd)
30883 {
30884 BIO *wbio = SSL_get_wbio(s);
30885 int desired_type = ((s) !=
30886 # 1727 "ssl/ssl_lib.c" 3 4
30887 ((void *)0)
30888 # 1727 "ssl/ssl_lib.c"
30889 && ((s)->type == 1 || (s)->type == 2)) ? (21|0x0400|0x0100) : ( 5|0x0400|0x0100);
30890
30891 if (s->type == 2) {
30892 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1730,__func__), ERR_set_error)((20),(356),
30893 # 1730 "ssl/ssl_lib.c" 3 4
30894 ((void *)0)
30895 # 1730 "ssl/ssl_lib.c"
30896 );
30897 return 0;
30898 }
30899
30900 if (wbio ==
30901 # 1734 "ssl/ssl_lib.c" 3 4
30902 ((void *)0)
30903 # 1734 "ssl/ssl_lib.c"
30904 || BIO_method_type(wbio) != desired_type
30905 || ((int)BIO_ctrl(wbio,105,0,(char *)(
30906 # 1735 "ssl/ssl_lib.c" 3 4
30907 ((void *)0)
30908 # 1735 "ssl/ssl_lib.c"
30909 )) != fd)) {
30910 BIO *bio = BIO_new(fd_method(s));
30911
30912 if (bio ==
30913 # 1738 "ssl/ssl_lib.c" 3 4
30914 ((void *)0)
30915 # 1738 "ssl/ssl_lib.c"
30916 ) {
30917 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1739,__func__), ERR_set_error)((20),((7 | (0x2 << 18L))),
30918 # 1739 "ssl/ssl_lib.c" 3 4
30919 ((void *)0)
30920 # 1739 "ssl/ssl_lib.c"
30921 );
30922 return 0;
30923 }
30924 BIO_int_ctrl(bio,104,0x00,fd);
30925 SSL_set0_rbio(s, bio);
30926 } else {
30927 BIO_up_ref(wbio);
30928 SSL_set0_rbio(s, wbio);
30929 }
30930
30931 return 1;
30932 }
30933
30934
30935
30936 size_t SSL_get_finished(const SSL *s, void *buf, size_t count)
30937 {
30938 size_t ret = 0;
30939 const SSL_CONNECTION *sc = ((s) ==
30940 # 1757 "ssl/ssl_lib.c" 3 4
30941 ((void *)0)
30942 # 1757 "ssl/ssl_lib.c"
30943 ?
30944 # 1757 "ssl/ssl_lib.c" 3 4
30945 ((void *)0)
30946 # 1757 "ssl/ssl_lib.c"
30947 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
30948 # 1757 "ssl/ssl_lib.c" 3 4
30949 ((void *)0)
30950 # 1757 "ssl/ssl_lib.c"
30951 )));
30952
30953 if (sc ==
30954 # 1759 "ssl/ssl_lib.c" 3 4
30955 ((void *)0)
30956 # 1759 "ssl/ssl_lib.c"
30957 )
30958 return 0;
30959
30960 ret = sc->s3.tmp.finish_md_len;
30961 if (count > ret)
30962 count = ret;
30963 memcpy(buf, sc->s3.tmp.finish_md, count);
30964 return ret;
30965 }
30966
30967
30968 size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count)
30969 {
30970 size_t ret = 0;
30971 const SSL_CONNECTION *sc = ((s) ==
30972 # 1773 "ssl/ssl_lib.c" 3 4
30973 ((void *)0)
30974 # 1773 "ssl/ssl_lib.c"
30975 ?
30976 # 1773 "ssl/ssl_lib.c" 3 4
30977 ((void *)0)
30978 # 1773 "ssl/ssl_lib.c"
30979 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
30980 # 1773 "ssl/ssl_lib.c" 3 4
30981 ((void *)0)
30982 # 1773 "ssl/ssl_lib.c"
30983 )));
30984
30985 if (sc ==
30986 # 1775 "ssl/ssl_lib.c" 3 4
30987 ((void *)0)
30988 # 1775 "ssl/ssl_lib.c"
30989 )
30990 return 0;
30991
30992 ret = sc->s3.tmp.peer_finish_md_len;
30993 if (count > ret)
30994 count = ret;
30995 memcpy(buf, sc->s3.tmp.peer_finish_md, count);
30996 return ret;
30997 }
30998
30999 int SSL_get_verify_mode(const SSL *s)
31000 {
31001 const SSL_CONNECTION *sc = ((s) ==
31002 # 1787 "ssl/ssl_lib.c" 3 4
31003 ((void *)0)
31004 # 1787 "ssl/ssl_lib.c"
31005 ?
31006 # 1787 "ssl/ssl_lib.c" 3 4
31007 ((void *)0)
31008 # 1787 "ssl/ssl_lib.c"
31009 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
31010 # 1787 "ssl/ssl_lib.c" 3 4
31011 ((void *)0)
31012 # 1787 "ssl/ssl_lib.c"
31013 )));
31014
31015 if (sc ==
31016 # 1789 "ssl/ssl_lib.c" 3 4
31017 ((void *)0)
31018 # 1789 "ssl/ssl_lib.c"
31019 )
31020 return 0;
31021
31022 return sc->verify_mode;
31023 }
31024
31025 int SSL_get_verify_depth(const SSL *s)
31026 {
31027 const SSL_CONNECTION *sc = ((s) ==
31028 # 1797 "ssl/ssl_lib.c" 3 4
31029 ((void *)0)
31030 # 1797 "ssl/ssl_lib.c"
31031 ?
31032 # 1797 "ssl/ssl_lib.c" 3 4
31033 ((void *)0)
31034 # 1797 "ssl/ssl_lib.c"
31035 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
31036 # 1797 "ssl/ssl_lib.c" 3 4
31037 ((void *)0)
31038 # 1797 "ssl/ssl_lib.c"
31039 )));
31040
31041 if (sc ==
31042 # 1799 "ssl/ssl_lib.c" 3 4
31043 ((void *)0)
31044 # 1799 "ssl/ssl_lib.c"
31045 )
31046 return 0;
31047
31048 return X509_VERIFY_PARAM_get_depth(sc->param);
31049 }
31050
31051 int (*SSL_get_verify_callback(const SSL *s)) (int, X509_STORE_CTX *) {
31052 const SSL_CONNECTION *sc = ((s) ==
31053 # 1806 "ssl/ssl_lib.c" 3 4
31054 ((void *)0)
31055 # 1806 "ssl/ssl_lib.c"
31056 ?
31057 # 1806 "ssl/ssl_lib.c" 3 4
31058 ((void *)0)
31059 # 1806 "ssl/ssl_lib.c"
31060 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
31061 # 1806 "ssl/ssl_lib.c" 3 4
31062 ((void *)0)
31063 # 1806 "ssl/ssl_lib.c"
31064 )));
31065
31066 if (sc ==
31067 # 1808 "ssl/ssl_lib.c" 3 4
31068 ((void *)0)
31069 # 1808 "ssl/ssl_lib.c"
31070 )
31071 return
31072 # 1809 "ssl/ssl_lib.c" 3 4
31073 ((void *)0)
31074 # 1809 "ssl/ssl_lib.c"
31075 ;
31076
31077 return sc->verify_callback;
31078 }
31079
31080 int SSL_CTX_get_verify_mode(const SSL_CTX *ctx)
31081 {
31082 return ctx->verify_mode;
31083 }
31084
31085 int SSL_CTX_get_verify_depth(const SSL_CTX *ctx)
31086 {
31087 return X509_VERIFY_PARAM_get_depth(ctx->param);
31088 }
31089
31090 int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx)) (int, X509_STORE_CTX *) {
31091 return ctx->default_verify_callback;
31092 }
31093
31094 void SSL_set_verify(SSL *s, int mode,
31095 int (*callback) (int ok, X509_STORE_CTX *ctx))
31096 {
31097 SSL_CONNECTION *sc = ((s) ==
31098 # 1831 "ssl/ssl_lib.c" 3 4
31099 ((void *)0)
31100 # 1831 "ssl/ssl_lib.c"
31101 ?
31102 # 1831 "ssl/ssl_lib.c" 3 4
31103 ((void *)0)
31104 # 1831 "ssl/ssl_lib.c"
31105 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
31106 # 1831 "ssl/ssl_lib.c" 3 4
31107 ((void *)0)
31108 # 1831 "ssl/ssl_lib.c"
31109 )));
31110
31111 if (sc ==
31112 # 1833 "ssl/ssl_lib.c" 3 4
31113 ((void *)0)
31114 # 1833 "ssl/ssl_lib.c"
31115 )
31116 return;
31117
31118 sc->verify_mode = mode;
31119 if (callback !=
31120 # 1837 "ssl/ssl_lib.c" 3 4
31121 ((void *)0)
31122 # 1837 "ssl/ssl_lib.c"
31123 )
31124 sc->verify_callback = callback;
31125 }
31126
31127 void SSL_set_verify_depth(SSL *s, int depth)
31128 {
31129 SSL_CONNECTION *sc = ((s) ==
31130 # 1843 "ssl/ssl_lib.c" 3 4
31131 ((void *)0)
31132 # 1843 "ssl/ssl_lib.c"
31133 ?
31134 # 1843 "ssl/ssl_lib.c" 3 4
31135 ((void *)0)
31136 # 1843 "ssl/ssl_lib.c"
31137 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
31138 # 1843 "ssl/ssl_lib.c" 3 4
31139 ((void *)0)
31140 # 1843 "ssl/ssl_lib.c"
31141 )));
31142
31143 if (sc ==
31144 # 1845 "ssl/ssl_lib.c" 3 4
31145 ((void *)0)
31146 # 1845 "ssl/ssl_lib.c"
31147 )
31148 return;
31149
31150 X509_VERIFY_PARAM_set_depth(sc->param, depth);
31151 }
31152
31153 void SSL_set_read_ahead(SSL *s, int yes)
31154 {
31155 SSL_CONNECTION *sc = ((s) ==
31156 # 1853 "ssl/ssl_lib.c" 3 4
31157 ((void *)0)
31158 # 1853 "ssl/ssl_lib.c"
31159 ?
31160 # 1853 "ssl/ssl_lib.c" 3 4
31161 ((void *)0)
31162 # 1853 "ssl/ssl_lib.c"
31163 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
31164 # 1853 "ssl/ssl_lib.c" 3 4
31165 ((void *)0)
31166 # 1853 "ssl/ssl_lib.c"
31167 ));
31168 OSSL_PARAM options[2], *opts = options;
31169
31170 if (sc ==
31171 # 1856 "ssl/ssl_lib.c" 3 4
31172 ((void *)0)
31173 # 1856 "ssl/ssl_lib.c"
31174 )
31175 return;
31176
31177 ((&sc->rlayer)->read_ahead = (yes));
31178
31179 *opts++ = OSSL_PARAM_construct_int("read_ahead",
31180 &sc->rlayer.read_ahead);
31181 *opts = OSSL_PARAM_construct_end();
31182
31183
31184 sc->rlayer.rrlmethod->set_options(sc->rlayer.rrl, options);
31185 }
31186
31187 int SSL_get_read_ahead(const SSL *s)
31188 {
31189 const SSL_CONNECTION *sc = ((s) ==
31190 # 1871 "ssl/ssl_lib.c" 3 4
31191 ((void *)0)
31192 # 1871 "ssl/ssl_lib.c"
31193 ?
31194 # 1871 "ssl/ssl_lib.c" 3 4
31195 ((void *)0)
31196 # 1871 "ssl/ssl_lib.c"
31197 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) :
31198 # 1871 "ssl/ssl_lib.c" 3 4
31199 ((void *)0)
31200 # 1871 "ssl/ssl_lib.c"
31201 ));
31202
31203 if (sc ==
31204 # 1873 "ssl/ssl_lib.c" 3 4
31205 ((void *)0)
31206 # 1873 "ssl/ssl_lib.c"
31207 )
31208 return 0;
31209
31210 return ((&sc->rlayer)->read_ahead);
31211 }
31212
31213 int SSL_pending(const SSL *s)
31214 {
31215 size_t pending = s->method->ssl_pending(s);
31216 # 1893 "ssl/ssl_lib.c"
31217 return pending < 0x7fffffff
31218 # 1893 "ssl/ssl_lib.c"
31219 ? (int)pending : 0x7fffffff
31220 # 1893 "ssl/ssl_lib.c"
31221 ;
31222 }
31223
31224 int SSL_has_pending(const SSL *s)
31225 {
31226 # 1906 "ssl/ssl_lib.c"
31227 const SSL_CONNECTION *sc;
31228
31229
31230 if (((s) !=
31231 # 1909 "ssl/ssl_lib.c" 3 4
31232 ((void *)0)
31233 # 1909 "ssl/ssl_lib.c"
31234 && ((s)->type == 1 || (s)->type == 2)))
31235 return ossl_quic_has_pending(s);
31236
31237
31238 sc = ((s) ==
31239 # 1913 "ssl/ssl_lib.c" 3 4
31240 ((void *)0)
31241 # 1913 "ssl/ssl_lib.c"
31242 ?
31243 # 1913 "ssl/ssl_lib.c" 3 4
31244 ((void *)0)
31245 # 1913 "ssl/ssl_lib.c"
31246 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
31247 # 1913 "ssl/ssl_lib.c" 3 4
31248 ((void *)0)
31249 # 1913 "ssl/ssl_lib.c"
31250 )));
31251
31252
31253 if (((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8)) {
31254 TLS_RECORD *rdata;
31255 pitem *item, *iter;
31256
31257 iter = pqueue_iterator(sc->rlayer.d->buffered_app_data);
31258 while ((item = pqueue_next(&iter)) !=
31259 # 1921 "ssl/ssl_lib.c" 3 4
31260 ((void *)0)
31261 # 1921 "ssl/ssl_lib.c"
31262 ) {
31263 rdata = item->data;
31264 if (rdata->length > 0)
31265 return 1;
31266 }
31267 }
31268
31269 if (RECORD_LAYER_processed_read_pending(&sc->rlayer))
31270 return 1;
31271
31272 return RECORD_LAYER_read_pending(&sc->rlayer);
31273 }
31274
31275 X509 *SSL_get1_peer_certificate(const SSL *s)
31276 {
31277 X509 *r = SSL_get0_peer_certificate(s);
31278
31279 if (r !=
31280 # 1938 "ssl/ssl_lib.c" 3 4
31281 ((void *)0)
31282 # 1938 "ssl/ssl_lib.c"
31283 )
31284 X509_up_ref(r);
31285
31286 return r;
31287 }
31288
31289 X509 *SSL_get0_peer_certificate(const SSL *s)
31290 {
31291 const SSL_CONNECTION *sc = ((s) ==
31292 # 1946 "ssl/ssl_lib.c" 3 4
31293 ((void *)0)
31294 # 1946 "ssl/ssl_lib.c"
31295 ?
31296 # 1946 "ssl/ssl_lib.c" 3 4
31297 ((void *)0)
31298 # 1946 "ssl/ssl_lib.c"
31299 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
31300 # 1946 "ssl/ssl_lib.c" 3 4
31301 ((void *)0)
31302 # 1946 "ssl/ssl_lib.c"
31303 )));
31304
31305 if (sc ==
31306 # 1948 "ssl/ssl_lib.c" 3 4
31307 ((void *)0)
31308 # 1948 "ssl/ssl_lib.c"
31309 )
31310 return
31311 # 1949 "ssl/ssl_lib.c" 3 4
31312 ((void *)0)
31313 # 1949 "ssl/ssl_lib.c"
31314 ;
31315
31316 if (sc->session ==
31317 # 1951 "ssl/ssl_lib.c" 3 4
31318 ((void *)0)
31319 # 1951 "ssl/ssl_lib.c"
31320 )
31321 return
31322 # 1952 "ssl/ssl_lib.c" 3 4
31323 ((void *)0)
31324 # 1952 "ssl/ssl_lib.c"
31325 ;
31326 else
31327 return sc->session->peer;
31328 }
31329
31330 struct stack_st_X509 *SSL_get_peer_cert_chain(const SSL *s)
31331 {
31332 struct stack_st_X509 *r;
31333 const SSL_CONNECTION *sc = ((s) ==
31334 # 1960 "ssl/ssl_lib.c" 3 4
31335 ((void *)0)
31336 # 1960 "ssl/ssl_lib.c"
31337 ?
31338 # 1960 "ssl/ssl_lib.c" 3 4
31339 ((void *)0)
31340 # 1960 "ssl/ssl_lib.c"
31341 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
31342 # 1960 "ssl/ssl_lib.c" 3 4
31343 ((void *)0)
31344 # 1960 "ssl/ssl_lib.c"
31345 )));
31346
31347 if (sc ==
31348 # 1962 "ssl/ssl_lib.c" 3 4
31349 ((void *)0)
31350 # 1962 "ssl/ssl_lib.c"
31351 )
31352 return
31353 # 1963 "ssl/ssl_lib.c" 3 4
31354 ((void *)0)
31355 # 1963 "ssl/ssl_lib.c"
31356 ;
31357
31358 if (sc->session ==
31359 # 1965 "ssl/ssl_lib.c" 3 4
31360 ((void *)0)
31361 # 1965 "ssl/ssl_lib.c"
31362 )
31363 r =
31364 # 1966 "ssl/ssl_lib.c" 3 4
31365 ((void *)0)
31366 # 1966 "ssl/ssl_lib.c"
31367 ;
31368 else
31369 r = sc->session->peer_chain;
31370
31371
31372
31373
31374
31375
31376 return r;
31377 }
31378
31379
31380
31381
31382
31383 int SSL_copy_session_id(SSL *t, const SSL *f)
31384 {
31385 int i;
31386
31387 SSL_CONNECTION *tsc = ((t) ==
31388 # 1986 "ssl/ssl_lib.c" 3 4
31389 ((void *)0)
31390 # 1986 "ssl/ssl_lib.c"
31391 ?
31392 # 1986 "ssl/ssl_lib.c" 3 4
31393 ((void *)0)
31394 # 1986 "ssl/ssl_lib.c"
31395 : ((t)->type == 0 ? ( SSL_CONNECTION *)(t) :
31396 # 1986 "ssl/ssl_lib.c" 3 4
31397 ((void *)0)
31398 # 1986 "ssl/ssl_lib.c"
31399 ));
31400 const SSL_CONNECTION *fsc = ((f) ==
31401 # 1987 "ssl/ssl_lib.c" 3 4
31402 ((void *)0)
31403 # 1987 "ssl/ssl_lib.c"
31404 ?
31405 # 1987 "ssl/ssl_lib.c" 3 4
31406 ((void *)0)
31407 # 1987 "ssl/ssl_lib.c"
31408 : ((f)->type == 0 ? (const SSL_CONNECTION *)(f) :
31409 # 1987 "ssl/ssl_lib.c" 3 4
31410 ((void *)0)
31411 # 1987 "ssl/ssl_lib.c"
31412 ));
31413
31414 if (tsc ==
31415 # 1989 "ssl/ssl_lib.c" 3 4
31416 ((void *)0)
31417 # 1989 "ssl/ssl_lib.c"
31418 || fsc ==
31419 # 1989 "ssl/ssl_lib.c" 3 4
31420 ((void *)0)
31421 # 1989 "ssl/ssl_lib.c"
31422 )
31423 return 0;
31424
31425
31426 if (!SSL_set_session(t, SSL_get_session(f))) {
31427 return 0;
31428 }
31429
31430
31431
31432
31433 if (t->method != f->method) {
31434 t->method->ssl_deinit(t);
31435 t->method = f->method;
31436 if (t->method->ssl_init(t) == 0)
31437 return 0;
31438 }
31439
31440 CRYPTO_UP_REF(&fsc->cert->references, &i);
31441 ssl_cert_free(tsc->cert);
31442 tsc->cert = fsc->cert;
31443 if (!SSL_set_session_id_context(t, fsc->sid_ctx, (int)fsc->sid_ctx_length)) {
31444 return 0;
31445 }
31446
31447 return 1;
31448 }
31449
31450
31451 int SSL_CTX_check_private_key(const SSL_CTX *ctx)
31452 {
31453 if ((ctx ==
31454 # 2020 "ssl/ssl_lib.c" 3 4
31455 ((void *)0)
31456 # 2020 "ssl/ssl_lib.c"
31457 ) || (ctx->cert->key->x509 ==
31458 # 2020 "ssl/ssl_lib.c" 3 4
31459 ((void *)0)
31460 # 2020 "ssl/ssl_lib.c"
31461 )) {
31462 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2021,__func__), ERR_set_error)((20),(177),
31463 # 2021 "ssl/ssl_lib.c" 3 4
31464 ((void *)0)
31465 # 2021 "ssl/ssl_lib.c"
31466 );
31467 return 0;
31468 }
31469 if (ctx->cert->key->privatekey ==
31470 # 2024 "ssl/ssl_lib.c" 3 4
31471 ((void *)0)
31472 # 2024 "ssl/ssl_lib.c"
31473 ) {
31474 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2025,__func__), ERR_set_error)((20),(190),
31475 # 2025 "ssl/ssl_lib.c" 3 4
31476 ((void *)0)
31477 # 2025 "ssl/ssl_lib.c"
31478 );
31479 return 0;
31480 }
31481 return X509_check_private_key
31482 (ctx->cert->key->x509, ctx->cert->key->privatekey);
31483 }
31484
31485
31486 int SSL_check_private_key(const SSL *ssl)
31487 {
31488 const SSL_CONNECTION *sc;
31489
31490 if ((sc = ((ssl) ==
31491 # 2037 "ssl/ssl_lib.c" 3 4
31492 ((void *)0)
31493 # 2037 "ssl/ssl_lib.c"
31494 ?
31495 # 2037 "ssl/ssl_lib.c" 3 4
31496 ((void *)0)
31497 # 2037 "ssl/ssl_lib.c"
31498 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls :
31499 # 2037 "ssl/ssl_lib.c" 3 4
31500 ((void *)0)
31501 # 2037 "ssl/ssl_lib.c"
31502 )))) ==
31503 # 2037 "ssl/ssl_lib.c" 3 4
31504 ((void *)0)
31505 # 2037 "ssl/ssl_lib.c"
31506 ) {
31507 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2038,__func__), ERR_set_error)((20),((258|((0x1 << 18L)|(0x2 << 18L)))),
31508 # 2038 "ssl/ssl_lib.c" 3 4
31509 ((void *)0)
31510 # 2038 "ssl/ssl_lib.c"
31511 );
31512 return 0;
31513 }
31514 if (sc->cert->key->x509 ==
31515 # 2041 "ssl/ssl_lib.c" 3 4
31516 ((void *)0)
31517 # 2041 "ssl/ssl_lib.c"
31518 ) {
31519 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2042,__func__), ERR_set_error)((20),(177),
31520 # 2042 "ssl/ssl_lib.c" 3 4
31521 ((void *)0)
31522 # 2042 "ssl/ssl_lib.c"
31523 );
31524 return 0;
31525 }
31526 if (sc->cert->key->privatekey ==
31527 # 2045 "ssl/ssl_lib.c" 3 4
31528 ((void *)0)
31529 # 2045 "ssl/ssl_lib.c"
31530 ) {
31531 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2046,__func__), ERR_set_error)((20),(190),
31532 # 2046 "ssl/ssl_lib.c" 3 4
31533 ((void *)0)
31534 # 2046 "ssl/ssl_lib.c"
31535 );
31536 return 0;
31537 }
31538 return X509_check_private_key(sc->cert->key->x509,
31539 sc->cert->key->privatekey);
31540 }
31541
31542 int SSL_waiting_for_async(SSL *s)
31543 {
31544 SSL_CONNECTION *sc = ((s) ==
31545 # 2055 "ssl/ssl_lib.c" 3 4
31546 ((void *)0)
31547 # 2055 "ssl/ssl_lib.c"
31548 ?
31549 # 2055 "ssl/ssl_lib.c" 3 4
31550 ((void *)0)
31551 # 2055 "ssl/ssl_lib.c"
31552 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
31553 # 2055 "ssl/ssl_lib.c" 3 4
31554 ((void *)0)
31555 # 2055 "ssl/ssl_lib.c"
31556 )));
31557
31558 if (sc ==
31559 # 2057 "ssl/ssl_lib.c" 3 4
31560 ((void *)0)
31561 # 2057 "ssl/ssl_lib.c"
31562 )
31563 return 0;
31564
31565 if (sc->job)
31566 return 1;
31567
31568 return 0;
31569 }
31570
31571 int SSL_get_all_async_fds(SSL *s, int *fds, size_t *numfds)
31572 {
31573 ASYNC_WAIT_CTX *ctx;
31574 SSL_CONNECTION *sc = ((s) ==
31575 # 2069 "ssl/ssl_lib.c" 3 4
31576 ((void *)0)
31577 # 2069 "ssl/ssl_lib.c"
31578 ?
31579 # 2069 "ssl/ssl_lib.c" 3 4
31580 ((void *)0)
31581 # 2069 "ssl/ssl_lib.c"
31582 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
31583 # 2069 "ssl/ssl_lib.c" 3 4
31584 ((void *)0)
31585 # 2069 "ssl/ssl_lib.c"
31586 )));
31587
31588 if (sc ==
31589 # 2071 "ssl/ssl_lib.c" 3 4
31590 ((void *)0)
31591 # 2071 "ssl/ssl_lib.c"
31592 )
31593 return 0;
31594
31595 if ((ctx = sc->waitctx) ==
31596 # 2074 "ssl/ssl_lib.c" 3 4
31597 ((void *)0)
31598 # 2074 "ssl/ssl_lib.c"
31599 )
31600 return 0;
31601 return ASYNC_WAIT_CTX_get_all_fds(ctx, fds, numfds);
31602 }
31603
31604 int SSL_get_changed_async_fds(SSL *s, int *addfd, size_t *numaddfds,
31605 int *delfd, size_t *numdelfds)
31606 {
31607 ASYNC_WAIT_CTX *ctx;
31608 SSL_CONNECTION *sc = ((s) ==
31609 # 2083 "ssl/ssl_lib.c" 3 4
31610 ((void *)0)
31611 # 2083 "ssl/ssl_lib.c"
31612 ?
31613 # 2083 "ssl/ssl_lib.c" 3 4
31614 ((void *)0)
31615 # 2083 "ssl/ssl_lib.c"
31616 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
31617 # 2083 "ssl/ssl_lib.c" 3 4
31618 ((void *)0)
31619 # 2083 "ssl/ssl_lib.c"
31620 )));
31621
31622 if (sc ==
31623 # 2085 "ssl/ssl_lib.c" 3 4
31624 ((void *)0)
31625 # 2085 "ssl/ssl_lib.c"
31626 )
31627 return 0;
31628
31629 if ((ctx = sc->waitctx) ==
31630 # 2088 "ssl/ssl_lib.c" 3 4
31631 ((void *)0)
31632 # 2088 "ssl/ssl_lib.c"
31633 )
31634 return 0;
31635 return ASYNC_WAIT_CTX_get_changed_fds(ctx, addfd, numaddfds, delfd,
31636 numdelfds);
31637 }
31638
31639 int SSL_CTX_set_async_callback(SSL_CTX *ctx, SSL_async_callback_fn callback)
31640 {
31641 ctx->async_cb = callback;
31642 return 1;
31643 }
31644
31645 int SSL_CTX_set_async_callback_arg(SSL_CTX *ctx, void *arg)
31646 {
31647 ctx->async_cb_arg = arg;
31648 return 1;
31649 }
31650
31651 int SSL_set_async_callback(SSL *s, SSL_async_callback_fn callback)
31652 {
31653 SSL_CONNECTION *sc = ((s) ==
31654 # 2108 "ssl/ssl_lib.c" 3 4
31655 ((void *)0)
31656 # 2108 "ssl/ssl_lib.c"
31657 ?
31658 # 2108 "ssl/ssl_lib.c" 3 4
31659 ((void *)0)
31660 # 2108 "ssl/ssl_lib.c"
31661 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
31662 # 2108 "ssl/ssl_lib.c" 3 4
31663 ((void *)0)
31664 # 2108 "ssl/ssl_lib.c"
31665 )));
31666
31667 if (sc ==
31668 # 2110 "ssl/ssl_lib.c" 3 4
31669 ((void *)0)
31670 # 2110 "ssl/ssl_lib.c"
31671 )
31672 return 0;
31673
31674 sc->async_cb = callback;
31675 return 1;
31676 }
31677
31678 int SSL_set_async_callback_arg(SSL *s, void *arg)
31679 {
31680 SSL_CONNECTION *sc = ((s) ==
31681 # 2119 "ssl/ssl_lib.c" 3 4
31682 ((void *)0)
31683 # 2119 "ssl/ssl_lib.c"
31684 ?
31685 # 2119 "ssl/ssl_lib.c" 3 4
31686 ((void *)0)
31687 # 2119 "ssl/ssl_lib.c"
31688 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
31689 # 2119 "ssl/ssl_lib.c" 3 4
31690 ((void *)0)
31691 # 2119 "ssl/ssl_lib.c"
31692 )));
31693
31694 if (sc ==
31695 # 2121 "ssl/ssl_lib.c" 3 4
31696 ((void *)0)
31697 # 2121 "ssl/ssl_lib.c"
31698 )
31699 return 0;
31700
31701 sc->async_cb_arg = arg;
31702 return 1;
31703 }
31704
31705 int SSL_get_async_status(SSL *s, int *status)
31706 {
31707 ASYNC_WAIT_CTX *ctx;
31708 SSL_CONNECTION *sc = ((s) ==
31709 # 2131 "ssl/ssl_lib.c" 3 4
31710 ((void *)0)
31711 # 2131 "ssl/ssl_lib.c"
31712 ?
31713 # 2131 "ssl/ssl_lib.c" 3 4
31714 ((void *)0)
31715 # 2131 "ssl/ssl_lib.c"
31716 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
31717 # 2131 "ssl/ssl_lib.c" 3 4
31718 ((void *)0)
31719 # 2131 "ssl/ssl_lib.c"
31720 )));
31721
31722 if (sc ==
31723 # 2133 "ssl/ssl_lib.c" 3 4
31724 ((void *)0)
31725 # 2133 "ssl/ssl_lib.c"
31726 )
31727 return 0;
31728
31729 if ((ctx = sc->waitctx) ==
31730 # 2136 "ssl/ssl_lib.c" 3 4
31731 ((void *)0)
31732 # 2136 "ssl/ssl_lib.c"
31733 )
31734 return 0;
31735 *status = ASYNC_WAIT_CTX_get_status(ctx);
31736 return 1;
31737 }
31738
31739 int SSL_accept(SSL *s)
31740 {
31741 SSL_CONNECTION *sc = ((s) ==
31742 # 2144 "ssl/ssl_lib.c" 3 4
31743 ((void *)0)
31744 # 2144 "ssl/ssl_lib.c"
31745 ?
31746 # 2144 "ssl/ssl_lib.c" 3 4
31747 ((void *)0)
31748 # 2144 "ssl/ssl_lib.c"
31749 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
31750 # 2144 "ssl/ssl_lib.c" 3 4
31751 ((void *)0)
31752 # 2144 "ssl/ssl_lib.c"
31753 )));
31754
31755
31756 if (((s) !=
31757 # 2147 "ssl/ssl_lib.c" 3 4
31758 ((void *)0)
31759 # 2147 "ssl/ssl_lib.c"
31760 && ((s)->type == 1 || (s)->type == 2)))
31761 return s->method->ssl_accept(s);
31762
31763
31764 if (sc ==
31765 # 2151 "ssl/ssl_lib.c" 3 4
31766 ((void *)0)
31767 # 2151 "ssl/ssl_lib.c"
31768 )
31769 return 0;
31770
31771 if (sc->handshake_func ==
31772 # 2154 "ssl/ssl_lib.c" 3 4
31773 ((void *)0)
31774 # 2154 "ssl/ssl_lib.c"
31775 ) {
31776
31777 SSL_set_accept_state(s);
31778 }
31779
31780 return SSL_do_handshake(s);
31781 }
31782
31783 int SSL_connect(SSL *s)
31784 {
31785 SSL_CONNECTION *sc = ((s) ==
31786 # 2164 "ssl/ssl_lib.c" 3 4
31787 ((void *)0)
31788 # 2164 "ssl/ssl_lib.c"
31789 ?
31790 # 2164 "ssl/ssl_lib.c" 3 4
31791 ((void *)0)
31792 # 2164 "ssl/ssl_lib.c"
31793 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
31794 # 2164 "ssl/ssl_lib.c" 3 4
31795 ((void *)0)
31796 # 2164 "ssl/ssl_lib.c"
31797 )));
31798
31799
31800 if (((s) !=
31801 # 2167 "ssl/ssl_lib.c" 3 4
31802 ((void *)0)
31803 # 2167 "ssl/ssl_lib.c"
31804 && ((s)->type == 1 || (s)->type == 2)))
31805 return s->method->ssl_connect(s);
31806
31807
31808 if (sc ==
31809 # 2171 "ssl/ssl_lib.c" 3 4
31810 ((void *)0)
31811 # 2171 "ssl/ssl_lib.c"
31812 )
31813 return 0;
31814
31815 if (sc->handshake_func ==
31816 # 2174 "ssl/ssl_lib.c" 3 4
31817 ((void *)0)
31818 # 2174 "ssl/ssl_lib.c"
31819 ) {
31820
31821 SSL_set_connect_state(s);
31822 }
31823
31824 return SSL_do_handshake(s);
31825 }
31826
31827 long SSL_get_default_timeout(const SSL *s)
31828 {
31829 return (long int)(ossl_time2ticks(s->method->get_timeout()) / ((uint64_t)1000000000));
31830 }
31831
31832 static int ssl_async_wait_ctx_cb(void *arg)
31833 {
31834 SSL *s = (SSL *)arg;
31835 SSL_CONNECTION *sc = ((s) ==
31836 # 2190 "ssl/ssl_lib.c" 3 4
31837 ((void *)0)
31838 # 2190 "ssl/ssl_lib.c"
31839 ?
31840 # 2190 "ssl/ssl_lib.c" 3 4
31841 ((void *)0)
31842 # 2190 "ssl/ssl_lib.c"
31843 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
31844 # 2190 "ssl/ssl_lib.c" 3 4
31845 ((void *)0)
31846 # 2190 "ssl/ssl_lib.c"
31847 )));
31848
31849 if (sc ==
31850 # 2192 "ssl/ssl_lib.c" 3 4
31851 ((void *)0)
31852 # 2192 "ssl/ssl_lib.c"
31853 )
31854 return 0;
31855
31856 return sc->async_cb(s, sc->async_cb_arg);
31857 }
31858
31859 static int ssl_start_async_job(SSL *s, struct ssl_async_args *args,
31860 int (*func) (void *))
31861 {
31862 int ret;
31863 SSL_CONNECTION *sc = ((s) ==
31864 # 2202 "ssl/ssl_lib.c" 3 4
31865 ((void *)0)
31866 # 2202 "ssl/ssl_lib.c"
31867 ?
31868 # 2202 "ssl/ssl_lib.c" 3 4
31869 ((void *)0)
31870 # 2202 "ssl/ssl_lib.c"
31871 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
31872 # 2202 "ssl/ssl_lib.c" 3 4
31873 ((void *)0)
31874 # 2202 "ssl/ssl_lib.c"
31875 )));
31876
31877 if (sc ==
31878 # 2204 "ssl/ssl_lib.c" 3 4
31879 ((void *)0)
31880 # 2204 "ssl/ssl_lib.c"
31881 )
31882 return 0;
31883
31884 if (sc->waitctx ==
31885 # 2207 "ssl/ssl_lib.c" 3 4
31886 ((void *)0)
31887 # 2207 "ssl/ssl_lib.c"
31888 ) {
31889 sc->waitctx = ASYNC_WAIT_CTX_new();
31890 if (sc->waitctx ==
31891 # 2209 "ssl/ssl_lib.c" 3 4
31892 ((void *)0)
31893 # 2209 "ssl/ssl_lib.c"
31894 )
31895 return -1;
31896 if (sc->async_cb !=
31897 # 2211 "ssl/ssl_lib.c" 3 4
31898 ((void *)0)
31899
31900 # 2212 "ssl/ssl_lib.c"
31901 && !ASYNC_WAIT_CTX_set_callback
31902 (sc->waitctx, ssl_async_wait_ctx_cb, s))
31903 return -1;
31904 }
31905
31906 sc->rwstate = 1;
31907 switch (ASYNC_start_job(&sc->job, sc->waitctx, &ret, func, args,
31908 sizeof(struct ssl_async_args))) {
31909 case 0:
31910 sc->rwstate = 1;
31911 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2222,__func__), ERR_set_error)((20),(405),
31912 # 2222 "ssl/ssl_lib.c" 3 4
31913 ((void *)0)
31914 # 2222 "ssl/ssl_lib.c"
31915 );
31916 return -1;
31917 case 2:
31918 sc->rwstate = 5;
31919 return -1;
31920 case 1:
31921 sc->rwstate = 6;
31922 return -1;
31923 case 3:
31924 sc->job =
31925 # 2231 "ssl/ssl_lib.c" 3 4
31926 ((void *)0)
31927 # 2231 "ssl/ssl_lib.c"
31928 ;
31929 return ret;
31930 default:
31931 sc->rwstate = 1;
31932 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2235,__func__), ERR_set_error)((20),((259|((0x1 << 18L)|(0x2 << 18L)))),
31933 # 2235 "ssl/ssl_lib.c" 3 4
31934 ((void *)0)
31935 # 2235 "ssl/ssl_lib.c"
31936 );
31937
31938 return -1;
31939 }
31940 }
31941
31942 static int ssl_io_intern(void *vargs)
31943 {
31944 struct ssl_async_args *args;
31945 SSL *s;
31946 void *buf;
31947 size_t num;
31948 SSL_CONNECTION *sc;
31949
31950 args = (struct ssl_async_args *)vargs;
31951 s = args->s;
31952 buf = args->buf;
31953 num = args->num;
31954 if ((sc = ((s) ==
31955 # 2253 "ssl/ssl_lib.c" 3 4
31956 ((void *)0)
31957 # 2253 "ssl/ssl_lib.c"
31958 ?
31959 # 2253 "ssl/ssl_lib.c" 3 4
31960 ((void *)0)
31961 # 2253 "ssl/ssl_lib.c"
31962 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
31963 # 2253 "ssl/ssl_lib.c" 3 4
31964 ((void *)0)
31965 # 2253 "ssl/ssl_lib.c"
31966 )))) ==
31967 # 2253 "ssl/ssl_lib.c" 3 4
31968 ((void *)0)
31969 # 2253 "ssl/ssl_lib.c"
31970 )
31971 return -1;
31972
31973 switch (args->type) {
31974 case READFUNC:
31975 return args->f.func_read(s, buf, num, &sc->asyncrw);
31976 case WRITEFUNC:
31977 return args->f.func_write(s, buf, num, &sc->asyncrw);
31978 case OTHERFUNC:
31979 return args->f.func_other(s);
31980 }
31981 return -1;
31982 }
31983
31984 int ssl_read_internal(SSL *s, void *buf, size_t num, size_t *readbytes)
31985 {
31986 SSL_CONNECTION *sc = ((s) ==
31987 # 2269 "ssl/ssl_lib.c" 3 4
31988 ((void *)0)
31989 # 2269 "ssl/ssl_lib.c"
31990 ?
31991 # 2269 "ssl/ssl_lib.c" 3 4
31992 ((void *)0)
31993 # 2269 "ssl/ssl_lib.c"
31994 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
31995 # 2269 "ssl/ssl_lib.c" 3 4
31996 ((void *)0)
31997 # 2269 "ssl/ssl_lib.c"
31998 )));
31999
32000
32001 if (((s) !=
32002 # 2272 "ssl/ssl_lib.c" 3 4
32003 ((void *)0)
32004 # 2272 "ssl/ssl_lib.c"
32005 && ((s)->type == 1 || (s)->type == 2)))
32006 return s->method->ssl_read(s, buf, num, readbytes);
32007
32008
32009 if (sc ==
32010 # 2276 "ssl/ssl_lib.c" 3 4
32011 ((void *)0)
32012 # 2276 "ssl/ssl_lib.c"
32013 )
32014 return -1;
32015
32016 if (sc->handshake_func ==
32017 # 2279 "ssl/ssl_lib.c" 3 4
32018 ((void *)0)
32019 # 2279 "ssl/ssl_lib.c"
32020 ) {
32021 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2280,__func__), ERR_set_error)((20),(276),
32022 # 2280 "ssl/ssl_lib.c" 3 4
32023 ((void *)0)
32024 # 2280 "ssl/ssl_lib.c"
32025 );
32026 return -1;
32027 }
32028
32029 if (sc->shutdown & 2) {
32030 sc->rwstate = 1;
32031 return 0;
32032 }
32033
32034 if (sc->early_data_state == SSL_EARLY_DATA_CONNECT_RETRY
32035 || sc->early_data_state == SSL_EARLY_DATA_ACCEPT_RETRY) {
32036 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2291,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
32037 # 2291 "ssl/ssl_lib.c" 3 4
32038 ((void *)0)
32039 # 2291 "ssl/ssl_lib.c"
32040 );
32041 return 0;
32042 }
32043
32044
32045
32046
32047 ossl_statem_check_finish_init(sc, 0);
32048
32049 if ((sc->mode & 0x00000100U) && ASYNC_get_current_job() ==
32050 # 2300 "ssl/ssl_lib.c" 3 4
32051 ((void *)0)
32052 # 2300 "ssl/ssl_lib.c"
32053 ) {
32054 struct ssl_async_args args;
32055 int ret;
32056
32057 args.s = s;
32058 args.buf = buf;
32059 args.num = num;
32060 args.type = READFUNC;
32061 args.f.func_read = s->method->ssl_read;
32062
32063 ret = ssl_start_async_job(s, &args, ssl_io_intern);
32064 *readbytes = sc->asyncrw;
32065 return ret;
32066 } else {
32067 return s->method->ssl_read(s, buf, num, readbytes);
32068 }
32069 }
32070
32071 int SSL_read(SSL *s, void *buf, int num)
32072 {
32073 int ret;
32074 size_t readbytes;
32075
32076 if (num < 0) {
32077 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2324,__func__), ERR_set_error)((20),(271),
32078 # 2324 "ssl/ssl_lib.c" 3 4
32079 ((void *)0)
32080 # 2324 "ssl/ssl_lib.c"
32081 );
32082 return -1;
32083 }
32084
32085 ret = ssl_read_internal(s, buf, (size_t)num, &readbytes);
32086
32087
32088
32089
32090
32091 if (ret > 0)
32092 ret = (int)readbytes;
32093
32094 return ret;
32095 }
32096
32097 int SSL_read_ex(SSL *s, void *buf, size_t num, size_t *readbytes)
32098 {
32099 int ret = ssl_read_internal(s, buf, num, readbytes);
32100
32101 if (ret < 0)
32102 ret = 0;
32103 return ret;
32104 }
32105
32106 int SSL_read_early_data(SSL *s, void *buf, size_t num, size_t *readbytes)
32107 {
32108 int ret;
32109 SSL_CONNECTION *sc = ((s) ==
32110 # 2352 "ssl/ssl_lib.c" 3 4
32111 ((void *)0)
32112 # 2352 "ssl/ssl_lib.c"
32113 ?
32114 # 2352 "ssl/ssl_lib.c" 3 4
32115 ((void *)0)
32116 # 2352 "ssl/ssl_lib.c"
32117 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
32118 # 2352 "ssl/ssl_lib.c" 3 4
32119 ((void *)0)
32120 # 2352 "ssl/ssl_lib.c"
32121 ));
32122
32123
32124 if (sc ==
32125 # 2355 "ssl/ssl_lib.c" 3 4
32126 ((void *)0)
32127 # 2355 "ssl/ssl_lib.c"
32128 || !sc->server) {
32129 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2356,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
32130 # 2356 "ssl/ssl_lib.c" 3 4
32131 ((void *)0)
32132 # 2356 "ssl/ssl_lib.c"
32133 );
32134 return 0;
32135 }
32136
32137 switch (sc->early_data_state) {
32138 case SSL_EARLY_DATA_NONE:
32139 if (!SSL_in_before(s)) {
32140 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2363,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
32141 # 2363 "ssl/ssl_lib.c" 3 4
32142 ((void *)0)
32143 # 2363 "ssl/ssl_lib.c"
32144 );
32145 return 0;
32146 }
32147
32148
32149 case SSL_EARLY_DATA_ACCEPT_RETRY:
32150 sc->early_data_state = SSL_EARLY_DATA_ACCEPTING;
32151 ret = SSL_accept(s);
32152 if (ret <= 0) {
32153
32154 sc->early_data_state = SSL_EARLY_DATA_ACCEPT_RETRY;
32155 return 0;
32156 }
32157
32158
32159 case SSL_EARLY_DATA_READ_RETRY:
32160 if (sc->ext.early_data == 2) {
32161 sc->early_data_state = SSL_EARLY_DATA_READING;
32162 ret = SSL_read_ex(s, buf, num, readbytes);
32163
32164
32165
32166
32167
32168 if (ret > 0 || (ret <= 0 && sc->early_data_state
32169 != SSL_EARLY_DATA_FINISHED_READING)) {
32170 sc->early_data_state = SSL_EARLY_DATA_READ_RETRY;
32171 return ret > 0 ? 1
32172 : 0;
32173 }
32174 } else {
32175 sc->early_data_state = SSL_EARLY_DATA_FINISHED_READING;
32176 }
32177 *readbytes = 0;
32178 return 2;
32179
32180 default:
32181 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2400,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
32182 # 2400 "ssl/ssl_lib.c" 3 4
32183 ((void *)0)
32184 # 2400 "ssl/ssl_lib.c"
32185 );
32186 return 0;
32187 }
32188 }
32189
32190 int SSL_get_early_data_status(const SSL *s)
32191 {
32192 const SSL_CONNECTION *sc = ((s) ==
32193 # 2407 "ssl/ssl_lib.c" 3 4
32194 ((void *)0)
32195 # 2407 "ssl/ssl_lib.c"
32196 ?
32197 # 2407 "ssl/ssl_lib.c" 3 4
32198 ((void *)0)
32199 # 2407 "ssl/ssl_lib.c"
32200 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) :
32201 # 2407 "ssl/ssl_lib.c" 3 4
32202 ((void *)0)
32203 # 2407 "ssl/ssl_lib.c"
32204 ));
32205
32206
32207 if (sc ==
32208 # 2410 "ssl/ssl_lib.c" 3 4
32209 ((void *)0)
32210 # 2410 "ssl/ssl_lib.c"
32211 )
32212 return 0;
32213
32214 return sc->ext.early_data;
32215 }
32216
32217 static int ssl_peek_internal(SSL *s, void *buf, size_t num, size_t *readbytes)
32218 {
32219 SSL_CONNECTION *sc = ((s) ==
32220 # 2418 "ssl/ssl_lib.c" 3 4
32221 ((void *)0)
32222 # 2418 "ssl/ssl_lib.c"
32223 ?
32224 # 2418 "ssl/ssl_lib.c" 3 4
32225 ((void *)0)
32226 # 2418 "ssl/ssl_lib.c"
32227 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
32228 # 2418 "ssl/ssl_lib.c" 3 4
32229 ((void *)0)
32230 # 2418 "ssl/ssl_lib.c"
32231 )));
32232
32233
32234 if (((s) !=
32235 # 2421 "ssl/ssl_lib.c" 3 4
32236 ((void *)0)
32237 # 2421 "ssl/ssl_lib.c"
32238 && ((s)->type == 1 || (s)->type == 2)))
32239 return s->method->ssl_peek(s, buf, num, readbytes);
32240
32241
32242 if (sc ==
32243 # 2425 "ssl/ssl_lib.c" 3 4
32244 ((void *)0)
32245 # 2425 "ssl/ssl_lib.c"
32246 )
32247 return 0;
32248
32249 if (sc->handshake_func ==
32250 # 2428 "ssl/ssl_lib.c" 3 4
32251 ((void *)0)
32252 # 2428 "ssl/ssl_lib.c"
32253 ) {
32254 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2429,__func__), ERR_set_error)((20),(276),
32255 # 2429 "ssl/ssl_lib.c" 3 4
32256 ((void *)0)
32257 # 2429 "ssl/ssl_lib.c"
32258 );
32259 return -1;
32260 }
32261
32262 if (sc->shutdown & 2) {
32263 return 0;
32264 }
32265 if ((sc->mode & 0x00000100U) && ASYNC_get_current_job() ==
32266 # 2436 "ssl/ssl_lib.c" 3 4
32267 ((void *)0)
32268 # 2436 "ssl/ssl_lib.c"
32269 ) {
32270 struct ssl_async_args args;
32271 int ret;
32272
32273 args.s = s;
32274 args.buf = buf;
32275 args.num = num;
32276 args.type = READFUNC;
32277 args.f.func_read = s->method->ssl_peek;
32278
32279 ret = ssl_start_async_job(s, &args, ssl_io_intern);
32280 *readbytes = sc->asyncrw;
32281 return ret;
32282 } else {
32283 return s->method->ssl_peek(s, buf, num, readbytes);
32284 }
32285 }
32286
32287 int SSL_peek(SSL *s, void *buf, int num)
32288 {
32289 int ret;
32290 size_t readbytes;
32291
32292 if (num < 0) {
32293 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2460,__func__), ERR_set_error)((20),(271),
32294 # 2460 "ssl/ssl_lib.c" 3 4
32295 ((void *)0)
32296 # 2460 "ssl/ssl_lib.c"
32297 );
32298 return -1;
32299 }
32300
32301 ret = ssl_peek_internal(s, buf, (size_t)num, &readbytes);
32302
32303
32304
32305
32306
32307 if (ret > 0)
32308 ret = (int)readbytes;
32309
32310 return ret;
32311 }
32312
32313
32314 int SSL_peek_ex(SSL *s, void *buf, size_t num, size_t *readbytes)
32315 {
32316 int ret = ssl_peek_internal(s, buf, num, readbytes);
32317
32318 if (ret < 0)
32319 ret = 0;
32320 return ret;
32321 }
32322
32323 int ssl_write_internal(SSL *s, const void *buf, size_t num,
32324 uint64_t flags, size_t *written)
32325 {
32326 SSL_CONNECTION *sc = ((s) ==
32327 # 2489 "ssl/ssl_lib.c" 3 4
32328 ((void *)0)
32329 # 2489 "ssl/ssl_lib.c"
32330 ?
32331 # 2489 "ssl/ssl_lib.c" 3 4
32332 ((void *)0)
32333 # 2489 "ssl/ssl_lib.c"
32334 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
32335 # 2489 "ssl/ssl_lib.c" 3 4
32336 ((void *)0)
32337 # 2489 "ssl/ssl_lib.c"
32338 )));
32339
32340
32341 if (((s) !=
32342 # 2492 "ssl/ssl_lib.c" 3 4
32343 ((void *)0)
32344 # 2492 "ssl/ssl_lib.c"
32345 && ((s)->type == 1 || (s)->type == 2)))
32346 return ossl_quic_write_flags(s, buf, num, flags, written);
32347
32348
32349 if (sc ==
32350 # 2496 "ssl/ssl_lib.c" 3 4
32351 ((void *)0)
32352 # 2496 "ssl/ssl_lib.c"
32353 )
32354 return 0;
32355
32356 if (sc->handshake_func ==
32357 # 2499 "ssl/ssl_lib.c" 3 4
32358 ((void *)0)
32359 # 2499 "ssl/ssl_lib.c"
32360 ) {
32361 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2500,__func__), ERR_set_error)((20),(276),
32362 # 2500 "ssl/ssl_lib.c" 3 4
32363 ((void *)0)
32364 # 2500 "ssl/ssl_lib.c"
32365 );
32366 return -1;
32367 }
32368
32369 if (sc->shutdown & 1) {
32370 sc->rwstate = 1;
32371 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2506,__func__), ERR_set_error)((20),(207),
32372 # 2506 "ssl/ssl_lib.c" 3 4
32373 ((void *)0)
32374 # 2506 "ssl/ssl_lib.c"
32375 );
32376 return -1;
32377 }
32378
32379 if (flags != 0) {
32380 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2511,__func__), ERR_set_error)((20),(412),
32381 # 2511 "ssl/ssl_lib.c" 3 4
32382 ((void *)0)
32383 # 2511 "ssl/ssl_lib.c"
32384 );
32385 return -1;
32386 }
32387
32388 if (sc->early_data_state == SSL_EARLY_DATA_CONNECT_RETRY
32389 || sc->early_data_state == SSL_EARLY_DATA_ACCEPT_RETRY
32390 || sc->early_data_state == SSL_EARLY_DATA_READ_RETRY) {
32391 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2518,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
32392 # 2518 "ssl/ssl_lib.c" 3 4
32393 ((void *)0)
32394 # 2518 "ssl/ssl_lib.c"
32395 );
32396 return 0;
32397 }
32398
32399 ossl_statem_check_finish_init(sc, 1);
32400
32401 if ((sc->mode & 0x00000100U) && ASYNC_get_current_job() ==
32402 # 2524 "ssl/ssl_lib.c" 3 4
32403 ((void *)0)
32404 # 2524 "ssl/ssl_lib.c"
32405 ) {
32406 int ret;
32407 struct ssl_async_args args;
32408
32409 args.s = s;
32410 args.buf = (void *)buf;
32411 args.num = num;
32412 args.type = WRITEFUNC;
32413 args.f.func_write = s->method->ssl_write;
32414
32415 ret = ssl_start_async_job(s, &args, ssl_io_intern);
32416 *written = sc->asyncrw;
32417 return ret;
32418 } else {
32419 return s->method->ssl_write(s, buf, num, written);
32420 }
32421 }
32422
32423 ssize_t SSL_sendfile(SSL *s, int fd, off_t offset, size_t size, int flags)
32424 {
32425 ssize_t ret;
32426 SSL_CONNECTION *sc = ((s) ==
32427 # 2545 "ssl/ssl_lib.c" 3 4
32428 ((void *)0)
32429 # 2545 "ssl/ssl_lib.c"
32430 ?
32431 # 2545 "ssl/ssl_lib.c" 3 4
32432 ((void *)0)
32433 # 2545 "ssl/ssl_lib.c"
32434 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
32435 # 2545 "ssl/ssl_lib.c" 3 4
32436 ((void *)0)
32437 # 2545 "ssl/ssl_lib.c"
32438 ));
32439
32440 if (sc ==
32441 # 2547 "ssl/ssl_lib.c" 3 4
32442 ((void *)0)
32443 # 2547 "ssl/ssl_lib.c"
32444 )
32445 return 0;
32446
32447 if (sc->handshake_func ==
32448 # 2550 "ssl/ssl_lib.c" 3 4
32449 ((void *)0)
32450 # 2550 "ssl/ssl_lib.c"
32451 ) {
32452 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2551,__func__), ERR_set_error)((20),(276),
32453 # 2551 "ssl/ssl_lib.c" 3 4
32454 ((void *)0)
32455 # 2551 "ssl/ssl_lib.c"
32456 );
32457 return -1;
32458 }
32459
32460 if (sc->shutdown & 1) {
32461 sc->rwstate = 1;
32462 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2557,__func__), ERR_set_error)((20),(207),
32463 # 2557 "ssl/ssl_lib.c" 3 4
32464 ((void *)0)
32465 # 2557 "ssl/ssl_lib.c"
32466 );
32467 return -1;
32468 }
32469
32470 if (!(0)) {
32471 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2562,__func__), ERR_set_error)((20),(276),
32472 # 2562 "ssl/ssl_lib.c" 3 4
32473 ((void *)0)
32474 # 2562 "ssl/ssl_lib.c"
32475 );
32476 return -1;
32477 }
32478
32479
32480 if (sc->s3.alert_dispatch > 0) {
32481 ret = (ssize_t)s->method->ssl_dispatch_alert(s);
32482 if (ret <= 0) {
32483
32484 return ret;
32485 }
32486
32487 }
32488
32489 sc->rwstate = 2;
32490 if ((int)BIO_ctrl(sc->wbio,11,0,
32491 # 2577 "ssl/ssl_lib.c" 3 4
32492 ((void *)0)
32493 # 2577 "ssl/ssl_lib.c"
32494 ) <= 0) {
32495 if (!BIO_test_flags(sc->wbio, 0x08)) {
32496 sc->rwstate = 1;
32497 } else {
32498
32499
32500 # 2582 "ssl/ssl_lib.c" 3 4
32501 (*__errno_location ())
32502 # 2582 "ssl/ssl_lib.c"
32503 =(
32504 # 2582 "ssl/ssl_lib.c" 3 4
32505 11
32506 # 2582 "ssl/ssl_lib.c"
32507 );
32508
32509 }
32510 return -1;
32511 }
32512
32513
32514 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2589,__func__), ERR_set_error)(20, (259|((0x1 << 18L)|(0x2 << 18L))),
32515 "can't call ktls_sendfile(), ktls disabled");
32516 return -1;
32517 # 2608 "ssl/ssl_lib.c"
32518 }
32519
32520 int SSL_write(SSL *s, const void *buf, int num)
32521 {
32522 int ret;
32523 size_t written;
32524
32525 if (num < 0) {
32526 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2616,__func__), ERR_set_error)((20),(271),
32527 # 2616 "ssl/ssl_lib.c" 3 4
32528 ((void *)0)
32529 # 2616 "ssl/ssl_lib.c"
32530 );
32531 return -1;
32532 }
32533
32534 ret = ssl_write_internal(s, buf, (size_t)num, 0, &written);
32535
32536
32537
32538
32539
32540 if (ret > 0)
32541 ret = (int)written;
32542
32543 return ret;
32544 }
32545
32546 int SSL_write_ex(SSL *s, const void *buf, size_t num, size_t *written)
32547 {
32548 return SSL_write_ex2(s, buf, num, 0, written);
32549 }
32550
32551 int SSL_write_ex2(SSL *s, const void *buf, size_t num, uint64_t flags,
32552 size_t *written)
32553 {
32554 int ret = ssl_write_internal(s, buf, num, flags, written);
32555
32556 if (ret < 0)
32557 ret = 0;
32558 return ret;
32559 }
32560
32561 int SSL_write_early_data(SSL *s, const void *buf, size_t num, size_t *written)
32562 {
32563 int ret, early_data_state;
32564 size_t writtmp;
32565 uint32_t partialwrite;
32566 SSL_CONNECTION *sc = ((s) ==
32567 # 2652 "ssl/ssl_lib.c" 3 4
32568 ((void *)0)
32569 # 2652 "ssl/ssl_lib.c"
32570 ?
32571 # 2652 "ssl/ssl_lib.c" 3 4
32572 ((void *)0)
32573 # 2652 "ssl/ssl_lib.c"
32574 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
32575 # 2652 "ssl/ssl_lib.c" 3 4
32576 ((void *)0)
32577 # 2652 "ssl/ssl_lib.c"
32578 ));
32579
32580
32581 if (sc ==
32582 # 2655 "ssl/ssl_lib.c" 3 4
32583 ((void *)0)
32584 # 2655 "ssl/ssl_lib.c"
32585 )
32586 return 0;
32587
32588 switch (sc->early_data_state) {
32589 case SSL_EARLY_DATA_NONE:
32590 if (sc->server
32591 || !SSL_in_before(s)
32592 || ((sc->session ==
32593 # 2662 "ssl/ssl_lib.c" 3 4
32594 ((void *)0)
32595 # 2662 "ssl/ssl_lib.c"
32596 || sc->session->ext.max_early_data == 0)
32597 && (sc->psk_use_session_cb ==
32598 # 2663 "ssl/ssl_lib.c" 3 4
32599 ((void *)0)
32600 # 2663 "ssl/ssl_lib.c"
32601 ))) {
32602 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2664,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
32603 # 2664 "ssl/ssl_lib.c" 3 4
32604 ((void *)0)
32605 # 2664 "ssl/ssl_lib.c"
32606 );
32607 return 0;
32608 }
32609
32610
32611 case SSL_EARLY_DATA_CONNECT_RETRY:
32612 sc->early_data_state = SSL_EARLY_DATA_CONNECTING;
32613 ret = SSL_connect(s);
32614 if (ret <= 0) {
32615
32616 sc->early_data_state = SSL_EARLY_DATA_CONNECT_RETRY;
32617 return 0;
32618 }
32619
32620
32621 case SSL_EARLY_DATA_WRITE_RETRY:
32622 sc->early_data_state = SSL_EARLY_DATA_WRITING;
32623
32624
32625
32626
32627
32628 partialwrite = sc->mode & 0x00000001U;
32629 sc->mode &= ~0x00000001U;
32630 ret = SSL_write_ex(s, buf, num, &writtmp);
32631 sc->mode |= partialwrite;
32632 if (!ret) {
32633 sc->early_data_state = SSL_EARLY_DATA_WRITE_RETRY;
32634 return ret;
32635 }
32636 sc->early_data_state = SSL_EARLY_DATA_WRITE_FLUSH;
32637
32638
32639 case SSL_EARLY_DATA_WRITE_FLUSH:
32640
32641 if (statem_flush(sc) != 1)
32642 return 0;
32643 *written = num;
32644 sc->early_data_state = SSL_EARLY_DATA_WRITE_RETRY;
32645 return 1;
32646
32647 case SSL_EARLY_DATA_FINISHED_READING:
32648 case SSL_EARLY_DATA_READ_RETRY:
32649 early_data_state = sc->early_data_state;
32650
32651 sc->early_data_state = SSL_EARLY_DATA_UNAUTH_WRITING;
32652 ret = SSL_write_ex(s, buf, num, written);
32653
32654 if (ret)
32655 (void)(int)BIO_ctrl(sc->wbio,11,0,
32656 # 2713 "ssl/ssl_lib.c" 3 4
32657 ((void *)0)
32658 # 2713 "ssl/ssl_lib.c"
32659 );
32660 sc->early_data_state = early_data_state;
32661 return ret;
32662
32663 default:
32664 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2718,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
32665 # 2718 "ssl/ssl_lib.c" 3 4
32666 ((void *)0)
32667 # 2718 "ssl/ssl_lib.c"
32668 );
32669 return 0;
32670 }
32671 }
32672
32673 int SSL_shutdown(SSL *s)
32674 {
32675
32676
32677
32678
32679
32680
32681 SSL_CONNECTION *sc = ((s) ==
32682 # 2731 "ssl/ssl_lib.c" 3 4
32683 ((void *)0)
32684 # 2731 "ssl/ssl_lib.c"
32685 ?
32686 # 2731 "ssl/ssl_lib.c" 3 4
32687 ((void *)0)
32688 # 2731 "ssl/ssl_lib.c"
32689 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
32690 # 2731 "ssl/ssl_lib.c" 3 4
32691 ((void *)0)
32692 # 2731 "ssl/ssl_lib.c"
32693 )));
32694
32695
32696 if (((s) !=
32697 # 2734 "ssl/ssl_lib.c" 3 4
32698 ((void *)0)
32699 # 2734 "ssl/ssl_lib.c"
32700 && ((s)->type == 1 || (s)->type == 2)))
32701 return ossl_quic_conn_shutdown(s, 0,
32702 # 2735 "ssl/ssl_lib.c" 3 4
32703 ((void *)0)
32704 # 2735 "ssl/ssl_lib.c"
32705 , 0);
32706
32707
32708 if (sc ==
32709 # 2738 "ssl/ssl_lib.c" 3 4
32710 ((void *)0)
32711 # 2738 "ssl/ssl_lib.c"
32712 )
32713 return -1;
32714
32715 if (sc->handshake_func ==
32716 # 2741 "ssl/ssl_lib.c" 3 4
32717 ((void *)0)
32718 # 2741 "ssl/ssl_lib.c"
32719 ) {
32720 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2742,__func__), ERR_set_error)((20),(276),
32721 # 2742 "ssl/ssl_lib.c" 3 4
32722 ((void *)0)
32723 # 2742 "ssl/ssl_lib.c"
32724 );
32725 return -1;
32726 }
32727
32728 if (!SSL_in_init(s)) {
32729 if ((sc->mode & 0x00000100U) && ASYNC_get_current_job() ==
32730 # 2747 "ssl/ssl_lib.c" 3 4
32731 ((void *)0)
32732 # 2747 "ssl/ssl_lib.c"
32733 ) {
32734 struct ssl_async_args args;
32735
32736 memset(&args, 0, sizeof(args));
32737 args.s = s;
32738 args.type = OTHERFUNC;
32739 args.f.func_other = s->method->ssl_shutdown;
32740
32741 return ssl_start_async_job(s, &args, ssl_io_intern);
32742 } else {
32743 return s->method->ssl_shutdown(s);
32744 }
32745 } else {
32746 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2760,__func__), ERR_set_error)((20),(407),
32747 # 2760 "ssl/ssl_lib.c" 3 4
32748 ((void *)0)
32749 # 2760 "ssl/ssl_lib.c"
32750 );
32751 return -1;
32752 }
32753 }
32754
32755 int SSL_key_update(SSL *s, int updatetype)
32756 {
32757 SSL_CONNECTION *sc = ((s) ==
32758 # 2767 "ssl/ssl_lib.c" 3 4
32759 ((void *)0)
32760 # 2767 "ssl/ssl_lib.c"
32761 ?
32762 # 2767 "ssl/ssl_lib.c" 3 4
32763 ((void *)0)
32764 # 2767 "ssl/ssl_lib.c"
32765 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
32766 # 2767 "ssl/ssl_lib.c" 3 4
32767 ((void *)0)
32768 # 2767 "ssl/ssl_lib.c"
32769 )));
32770
32771
32772 if (((s) !=
32773 # 2770 "ssl/ssl_lib.c" 3 4
32774 ((void *)0)
32775 # 2770 "ssl/ssl_lib.c"
32776 && ((s)->type == 1 || (s)->type == 2)))
32777 return ossl_quic_key_update(s, updatetype);
32778
32779
32780 if (sc ==
32781 # 2774 "ssl/ssl_lib.c" 3 4
32782 ((void *)0)
32783 # 2774 "ssl/ssl_lib.c"
32784 )
32785 return 0;
32786
32787 if (!(!((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(sc)->ssl)->method->version >= 0x0304 && (&(sc)->ssl)->method->version != 0x10000)) {
32788 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2778,__func__), ERR_set_error)((20),(266),
32789 # 2778 "ssl/ssl_lib.c" 3 4
32790 ((void *)0)
32791 # 2778 "ssl/ssl_lib.c"
32792 );
32793 return 0;
32794 }
32795
32796 if (updatetype != 0
32797 && updatetype != 1) {
32798 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2784,__func__), ERR_set_error)((20),(120),
32799 # 2784 "ssl/ssl_lib.c" 3 4
32800 ((void *)0)
32801 # 2784 "ssl/ssl_lib.c"
32802 );
32803 return 0;
32804 }
32805
32806 if (!SSL_is_init_finished(s)) {
32807 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2789,__func__), ERR_set_error)((20),(121),
32808 # 2789 "ssl/ssl_lib.c" 3 4
32809 ((void *)0)
32810 # 2789 "ssl/ssl_lib.c"
32811 );
32812 return 0;
32813 }
32814
32815 if (RECORD_LAYER_write_pending(&sc->rlayer)) {
32816 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2794,__func__), ERR_set_error)((20),(127),
32817 # 2794 "ssl/ssl_lib.c" 3 4
32818 ((void *)0)
32819 # 2794 "ssl/ssl_lib.c"
32820 );
32821 return 0;
32822 }
32823
32824 ossl_statem_set_in_init(sc, 1);
32825 sc->key_update = updatetype;
32826 return 1;
32827 }
32828
32829 int SSL_get_key_update_type(const SSL *s)
32830 {
32831 const SSL_CONNECTION *sc = ((s) ==
32832 # 2805 "ssl/ssl_lib.c" 3 4
32833 ((void *)0)
32834 # 2805 "ssl/ssl_lib.c"
32835 ?
32836 # 2805 "ssl/ssl_lib.c" 3 4
32837 ((void *)0)
32838 # 2805 "ssl/ssl_lib.c"
32839 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
32840 # 2805 "ssl/ssl_lib.c" 3 4
32841 ((void *)0)
32842 # 2805 "ssl/ssl_lib.c"
32843 )));
32844
32845
32846 if (((s) !=
32847 # 2808 "ssl/ssl_lib.c" 3 4
32848 ((void *)0)
32849 # 2808 "ssl/ssl_lib.c"
32850 && ((s)->type == 1 || (s)->type == 2)))
32851 return ossl_quic_get_key_update_type(s);
32852
32853
32854 if (sc ==
32855 # 2812 "ssl/ssl_lib.c" 3 4
32856 ((void *)0)
32857 # 2812 "ssl/ssl_lib.c"
32858 )
32859 return 0;
32860
32861 return sc->key_update;
32862 }
32863
32864
32865
32866
32867
32868 static int can_renegotiate(const SSL_CONNECTION *sc)
32869 {
32870 if ((!((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(sc)->ssl)->method->version >= 0x0304 && (&(sc)->ssl)->method->version != 0x10000)) {
32871 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2825,__func__), ERR_set_error)((20),(266),
32872 # 2825 "ssl/ssl_lib.c" 3 4
32873 ((void *)0)
32874 # 2825 "ssl/ssl_lib.c"
32875 );
32876 return 0;
32877 }
32878
32879 if ((sc->options & ((uint64_t)1 << (uint64_t)30)) != 0) {
32880 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2830,__func__), ERR_set_error)((20),(339),
32881 # 2830 "ssl/ssl_lib.c" 3 4
32882 ((void *)0)
32883 # 2830 "ssl/ssl_lib.c"
32884 );
32885 return 0;
32886 }
32887
32888 return 1;
32889 }
32890
32891 int SSL_renegotiate(SSL *s)
32892 {
32893 SSL_CONNECTION *sc = ((s) ==
32894 # 2839 "ssl/ssl_lib.c" 3 4
32895 ((void *)0)
32896 # 2839 "ssl/ssl_lib.c"
32897 ?
32898 # 2839 "ssl/ssl_lib.c" 3 4
32899 ((void *)0)
32900 # 2839 "ssl/ssl_lib.c"
32901 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
32902 # 2839 "ssl/ssl_lib.c" 3 4
32903 ((void *)0)
32904 # 2839 "ssl/ssl_lib.c"
32905 ));
32906
32907 if (sc ==
32908 # 2841 "ssl/ssl_lib.c" 3 4
32909 ((void *)0)
32910 # 2841 "ssl/ssl_lib.c"
32911 )
32912 return 0;
32913
32914 if (!can_renegotiate(sc))
32915 return 0;
32916
32917 sc->renegotiate = 1;
32918 sc->new_session = 1;
32919 return s->method->ssl_renegotiate(s);
32920 }
32921
32922 int SSL_renegotiate_abbreviated(SSL *s)
32923 {
32924 SSL_CONNECTION *sc = ((s) ==
32925 # 2854 "ssl/ssl_lib.c" 3 4
32926 ((void *)0)
32927 # 2854 "ssl/ssl_lib.c"
32928 ?
32929 # 2854 "ssl/ssl_lib.c" 3 4
32930 ((void *)0)
32931 # 2854 "ssl/ssl_lib.c"
32932 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
32933 # 2854 "ssl/ssl_lib.c" 3 4
32934 ((void *)0)
32935 # 2854 "ssl/ssl_lib.c"
32936 ));
32937
32938 if (sc ==
32939 # 2856 "ssl/ssl_lib.c" 3 4
32940 ((void *)0)
32941 # 2856 "ssl/ssl_lib.c"
32942 )
32943 return 0;
32944
32945 if (!can_renegotiate(sc))
32946 return 0;
32947
32948 sc->renegotiate = 1;
32949 sc->new_session = 0;
32950 return s->method->ssl_renegotiate(s);
32951 }
32952
32953 int SSL_renegotiate_pending(const SSL *s)
32954 {
32955 SSL_CONNECTION *sc = ((s) ==
32956 # 2869 "ssl/ssl_lib.c" 3 4
32957 ((void *)0)
32958 # 2869 "ssl/ssl_lib.c"
32959 ?
32960 # 2869 "ssl/ssl_lib.c" 3 4
32961 ((void *)0)
32962 # 2869 "ssl/ssl_lib.c"
32963 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
32964 # 2869 "ssl/ssl_lib.c" 3 4
32965 ((void *)0)
32966 # 2869 "ssl/ssl_lib.c"
32967 ));
32968
32969 if (sc ==
32970 # 2871 "ssl/ssl_lib.c" 3 4
32971 ((void *)0)
32972 # 2871 "ssl/ssl_lib.c"
32973 )
32974 return 0;
32975
32976
32977
32978
32979
32980 return (sc->renegotiate != 0);
32981 }
32982
32983 int SSL_new_session_ticket(SSL *s)
32984 {
32985 SSL_CONNECTION *sc = ((s) ==
32986 # 2883 "ssl/ssl_lib.c" 3 4
32987 ((void *)0)
32988 # 2883 "ssl/ssl_lib.c"
32989 ?
32990 # 2883 "ssl/ssl_lib.c" 3 4
32991 ((void *)0)
32992 # 2883 "ssl/ssl_lib.c"
32993 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
32994 # 2883 "ssl/ssl_lib.c" 3 4
32995 ((void *)0)
32996 # 2883 "ssl/ssl_lib.c"
32997 )));
32998
32999 if (sc ==
33000 # 2885 "ssl/ssl_lib.c" 3 4
33001 ((void *)0)
33002 # 2885 "ssl/ssl_lib.c"
33003 )
33004 return 0;
33005
33006
33007 if ((SSL_in_init(s) && sc->ext.extra_tickets_expected == 0)
33008 || ((sc)->s3.tmp.finish_md_len == 0 || (sc)->s3.tmp.peer_finish_md_len == 0) || !sc->server
33009 || !(!((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(sc)->ssl)->method->version >= 0x0304 && (&(sc)->ssl)->method->version != 0x10000))
33010 return 0;
33011 sc->ext.extra_tickets_expected++;
33012 if (!RECORD_LAYER_write_pending(&sc->rlayer) && !SSL_in_init(s))
33013 ossl_statem_set_in_init(sc, 1);
33014 return 1;
33015 }
33016
33017 long SSL_ctrl(SSL *s, int cmd, long larg, void *parg)
33018 {
33019 return ossl_ctrl_internal(s, cmd, larg, parg, 0);
33020 }
33021
33022 long ossl_ctrl_internal(SSL *s, int cmd, long larg, void *parg, int no_quic)
33023 {
33024 long l;
33025 SSL_CONNECTION *sc = ((s) ==
33026 # 2907 "ssl/ssl_lib.c" 3 4
33027 ((void *)0)
33028 # 2907 "ssl/ssl_lib.c"
33029 ?
33030 # 2907 "ssl/ssl_lib.c" 3 4
33031 ((void *)0)
33032 # 2907 "ssl/ssl_lib.c"
33033 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
33034 # 2907 "ssl/ssl_lib.c" 3 4
33035 ((void *)0)
33036 # 2907 "ssl/ssl_lib.c"
33037 )));
33038 # 2924 "ssl/ssl_lib.c"
33039 if (!no_quic && ((s) !=
33040 # 2924 "ssl/ssl_lib.c" 3 4
33041 ((void *)0)
33042 # 2924 "ssl/ssl_lib.c"
33043 && ((s)->type == 1 || (s)->type == 2)))
33044 return s->method->ssl_ctrl(s, cmd, larg, parg);
33045
33046 if (sc ==
33047 # 2927 "ssl/ssl_lib.c" 3 4
33048 ((void *)0)
33049 # 2927 "ssl/ssl_lib.c"
33050 )
33051 return 0;
33052
33053 switch (cmd) {
33054 case 40:
33055 return ((&sc->rlayer)->read_ahead);
33056 case 41:
33057 l = ((&sc->rlayer)->read_ahead);
33058 ((&sc->rlayer)->read_ahead = (larg));
33059 return l;
33060
33061 case 33:
33062 {
33063 OSSL_PARAM options[2], *opts = options;
33064
33065 sc->mode |= larg;
33066
33067 *opts++ = OSSL_PARAM_construct_uint32("mode",
33068 &sc->mode);
33069 *opts = OSSL_PARAM_construct_end();
33070
33071
33072 sc->rlayer.rrlmethod->set_options(sc->rlayer.rrl, options);
33073
33074 return sc->mode;
33075 }
33076 case 78:
33077 return (sc->mode &= ~larg);
33078 case 50:
33079 return (long)sc->max_cert_list;
33080 case 51:
33081 if (larg < 0)
33082 return 0;
33083 l = (long)sc->max_cert_list;
33084 sc->max_cert_list = (size_t)larg;
33085 return l;
33086 case 52:
33087 if (larg < 512 || larg > 16384)
33088 return 0;
33089
33090
33091
33092
33093 sc->max_send_fragment = larg;
33094 if (sc->max_send_fragment < sc->split_send_fragment)
33095 sc->split_send_fragment = sc->max_send_fragment;
33096 sc->rlayer.wrlmethod->set_max_frag_len(sc->rlayer.wrl, larg);
33097 return 1;
33098 case 125:
33099 if ((size_t)larg > sc->max_send_fragment || larg == 0)
33100 return 0;
33101 sc->split_send_fragment = larg;
33102 return 1;
33103 case 126:
33104 if (larg < 1 || larg > 32)
33105 return 0;
33106 sc->max_pipelines = larg;
33107 if (sc->rlayer.rrlmethod->set_max_pipelines !=
33108 # 2984 "ssl/ssl_lib.c" 3 4
33109 ((void *)0)
33110 # 2984 "ssl/ssl_lib.c"
33111 )
33112 sc->rlayer.rrlmethod->set_max_pipelines(sc->rlayer.rrl, (size_t)larg);
33113 return 1;
33114 case 76:
33115 return sc->s3.send_connection_binding;
33116 case 136:
33117 sc->rwstate = 8;
33118 return 1;
33119 case 99:
33120 return (sc->cert->cert_flags |= larg);
33121 case 100:
33122 return (sc->cert->cert_flags &= ~larg);
33123
33124 case 110:
33125 if (parg) {
33126 if (sc->s3.tmp.ciphers_raw ==
33127 # 2999 "ssl/ssl_lib.c" 3 4
33128 ((void *)0)
33129 # 2999 "ssl/ssl_lib.c"
33130 )
33131 return 0;
33132 *(unsigned char **)parg = sc->s3.tmp.ciphers_raw;
33133 return (int)sc->s3.tmp.ciphers_rawlen;
33134 } else {
33135 return 2;
33136 }
33137 case 122:
33138 if (!sc->session || SSL_in_init(s) || ossl_statem_get_in_handshake(sc))
33139 return -1;
33140 if (sc->session->flags & 0x1)
33141 return 1;
33142 else
33143 return 0;
33144 case 123:
33145 return ssl_check_allowed_versions(larg, sc->max_proto_version)
33146 && ssl_set_version_bound(s->defltmeth->version, (int)larg,
33147 &sc->min_proto_version);
33148 case 130:
33149 return sc->min_proto_version;
33150 case 124:
33151 return ssl_check_allowed_versions(sc->min_proto_version, larg)
33152 && ssl_set_version_bound(s->defltmeth->version, (int)larg,
33153 &sc->max_proto_version);
33154 case 131:
33155 return sc->max_proto_version;
33156 default:
33157 if (((s) !=
33158 # 3026 "ssl/ssl_lib.c" 3 4
33159 ((void *)0)
33160 # 3026 "ssl/ssl_lib.c"
33161 && ((s)->type == 1 || (s)->type == 2)))
33162 return SSL_ctrl((SSL *)sc, cmd, larg, parg);
33163 else
33164 return s->method->ssl_ctrl(s, cmd, larg, parg);
33165 }
33166 }
33167
33168 long SSL_callback_ctrl(SSL *s, int cmd, void (*fp) (void))
33169 {
33170 return s->method->ssl_callback_ctrl(s, cmd, fp);
33171 }
33172
33173 struct lhash_st_SSL_SESSION *SSL_CTX_sessions(SSL_CTX *ctx)
33174 {
33175 return ctx->sessions;
33176 }
33177
33178 static int ssl_tsan_load(SSL_CTX *ctx, _Atomic int *stat)
33179 {
33180 int res = 0;
33181
33182 if (ssl_tsan_lock(ctx)) {
33183 res =
33184 # 3048 "ssl/ssl_lib.c" 3 4
33185 __extension__ ({ __auto_type __atomic_load_ptr = (
33186 # 3048 "ssl/ssl_lib.c"
33187 (stat)
33188 # 3048 "ssl/ssl_lib.c" 3 4
33189 ); __typeof__ ((void)0, *__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, (
33190 # 3048 "ssl/ssl_lib.c"
33191 memory_order_relaxed
33192 # 3048 "ssl/ssl_lib.c" 3 4
33193 )); __atomic_load_tmp; })
33194 # 3048 "ssl/ssl_lib.c"
33195 ;
33196 ssl_tsan_unlock(ctx);
33197 }
33198 return res;
33199 }
33200
33201 long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
33202 {
33203 long l;
33204
33205 if (ctx ==
33206 # 3058 "ssl/ssl_lib.c" 3 4
33207 ((void *)0)
33208 # 3058 "ssl/ssl_lib.c"
33209 ) {
33210 switch (cmd) {
33211 case 92:
33212 return tls1_set_groups_list(ctx,
33213 # 3061 "ssl/ssl_lib.c" 3 4
33214 ((void *)0)
33215 # 3061 "ssl/ssl_lib.c"
33216 ,
33217 # 3061 "ssl/ssl_lib.c" 3 4
33218 ((void *)0)
33219 # 3061 "ssl/ssl_lib.c"
33220 , parg);
33221 case 98:
33222 case 102:
33223 return tls1_set_sigalgs_list(
33224 # 3064 "ssl/ssl_lib.c" 3 4
33225 ((void *)0)
33226 # 3064 "ssl/ssl_lib.c"
33227 , parg, 0);
33228 default:
33229 return 0;
33230 }
33231 }
33232
33233 switch (cmd) {
33234 case 40:
33235 return ctx->read_ahead;
33236 case 41:
33237 l = ctx->read_ahead;
33238 ctx->read_ahead = larg;
33239 return l;
33240
33241 case 16:
33242 ctx->msg_callback_arg = parg;
33243 return 1;
33244
33245 case 50:
33246 return (long)ctx->max_cert_list;
33247 case 51:
33248 if (larg < 0)
33249 return 0;
33250 l = (long)ctx->max_cert_list;
33251 ctx->max_cert_list = (size_t)larg;
33252 return l;
33253
33254 case 42:
33255 if (larg < 0)
33256 return 0;
33257 l = (long)ctx->session_cache_size;
33258 ctx->session_cache_size = (size_t)larg;
33259 return l;
33260 case 43:
33261 return (long)ctx->session_cache_size;
33262 case 44:
33263 l = ctx->session_cache_mode;
33264 ctx->session_cache_mode = larg;
33265 return l;
33266 case 45:
33267 return ctx->session_cache_mode;
33268
33269 case 20:
33270 return lh_SSL_SESSION_num_items(ctx->sessions);
33271 case 21:
33272 return ssl_tsan_load(ctx, &ctx->stats.sess_connect);
33273 case 22:
33274 return ssl_tsan_load(ctx, &ctx->stats.sess_connect_good);
33275 case 23:
33276 return ssl_tsan_load(ctx, &ctx->stats.sess_connect_renegotiate);
33277 case 24:
33278 return ssl_tsan_load(ctx, &ctx->stats.sess_accept);
33279 case 25:
33280 return ssl_tsan_load(ctx, &ctx->stats.sess_accept_good);
33281 case 26:
33282 return ssl_tsan_load(ctx, &ctx->stats.sess_accept_renegotiate);
33283 case 27:
33284 return ssl_tsan_load(ctx, &ctx->stats.sess_hit);
33285 case 28:
33286 return ssl_tsan_load(ctx, &ctx->stats.sess_cb_hit);
33287 case 29:
33288 return ssl_tsan_load(ctx, &ctx->stats.sess_miss);
33289 case 30:
33290 return ssl_tsan_load(ctx, &ctx->stats.sess_timeout);
33291 case 31:
33292 return ssl_tsan_load(ctx, &ctx->stats.sess_cache_full);
33293 case 33:
33294 return (ctx->mode |= larg);
33295 case 78:
33296 return (ctx->mode &= ~larg);
33297 case 52:
33298 if (larg < 512 || larg > 16384)
33299 return 0;
33300 ctx->max_send_fragment = larg;
33301 if (ctx->max_send_fragment < ctx->split_send_fragment)
33302 ctx->split_send_fragment = ctx->max_send_fragment;
33303 return 1;
33304 case 125:
33305 if ((size_t)larg > ctx->max_send_fragment || larg == 0)
33306 return 0;
33307 ctx->split_send_fragment = larg;
33308 return 1;
33309 case 126:
33310 if (larg < 1 || larg > 32)
33311 return 0;
33312 ctx->max_pipelines = larg;
33313 return 1;
33314 case 99:
33315 return (ctx->cert->cert_flags |= larg);
33316 case 100:
33317 return (ctx->cert->cert_flags &= ~larg);
33318 case 123:
33319 return ssl_check_allowed_versions(larg, ctx->max_proto_version)
33320 && ssl_set_version_bound(ctx->method->version, (int)larg,
33321 &ctx->min_proto_version);
33322 case 130:
33323 return ctx->min_proto_version;
33324 case 124:
33325 return ssl_check_allowed_versions(ctx->min_proto_version, larg)
33326 && ssl_set_version_bound(ctx->method->version, (int)larg,
33327 &ctx->max_proto_version);
33328 case 131:
33329 return ctx->max_proto_version;
33330 default:
33331 return ctx->method->ssl_ctx_ctrl(ctx, cmd, larg, parg);
33332 }
33333 }
33334
33335 long SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp) (void))
33336 {
33337 switch (cmd) {
33338 case 15:
33339 ctx->msg_callback = (void (*)
33340 (int write_p, int version, int content_type,
33341 const void *buf, size_t len, SSL *ssl,
33342 void *arg))(fp);
33343 return 1;
33344
33345 default:
33346 return ctx->method->ssl_ctx_callback_ctrl(ctx, cmd, fp);
33347 }
33348 }
33349
33350 int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b)
33351 {
33352 if (a->id > b->id)
33353 return 1;
33354 if (a->id < b->id)
33355 return -1;
33356 return 0;
33357 }
33358
33359 int ssl_cipher_ptr_id_cmp(const SSL_CIPHER *const *ap,
33360 const SSL_CIPHER *const *bp)
33361 {
33362 if ((*ap)->id > (*bp)->id)
33363 return 1;
33364 if ((*ap)->id < (*bp)->id)
33365 return -1;
33366 return 0;
33367 }
33368
33369
33370
33371
33372
33373 struct stack_st_SSL_CIPHER *SSL_get_ciphers(const SSL *s)
33374 {
33375 const SSL_CONNECTION *sc = ((s) ==
33376 # 3212 "ssl/ssl_lib.c" 3 4
33377 ((void *)0)
33378 # 3212 "ssl/ssl_lib.c"
33379 ?
33380 # 3212 "ssl/ssl_lib.c" 3 4
33381 ((void *)0)
33382 # 3212 "ssl/ssl_lib.c"
33383 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
33384 # 3212 "ssl/ssl_lib.c" 3 4
33385 ((void *)0)
33386 # 3212 "ssl/ssl_lib.c"
33387 )));
33388
33389 if (sc !=
33390 # 3214 "ssl/ssl_lib.c" 3 4
33391 ((void *)0)
33392 # 3214 "ssl/ssl_lib.c"
33393 ) {
33394 if (sc->cipher_list !=
33395 # 3215 "ssl/ssl_lib.c" 3 4
33396 ((void *)0)
33397 # 3215 "ssl/ssl_lib.c"
33398 ) {
33399 return sc->cipher_list;
33400 } else if ((s->ctx !=
33401 # 3217 "ssl/ssl_lib.c" 3 4
33402 ((void *)0)
33403 # 3217 "ssl/ssl_lib.c"
33404 ) && (s->ctx->cipher_list !=
33405 # 3217 "ssl/ssl_lib.c" 3 4
33406 ((void *)0)
33407 # 3217 "ssl/ssl_lib.c"
33408 )) {
33409 return s->ctx->cipher_list;
33410 }
33411 }
33412 return
33413 # 3221 "ssl/ssl_lib.c" 3 4
33414 ((void *)0)
33415 # 3221 "ssl/ssl_lib.c"
33416 ;
33417 }
33418
33419 struct stack_st_SSL_CIPHER *SSL_get_client_ciphers(const SSL *s)
33420 {
33421 const SSL_CONNECTION *sc = ((s) ==
33422 # 3226 "ssl/ssl_lib.c" 3 4
33423 ((void *)0)
33424 # 3226 "ssl/ssl_lib.c"
33425 ?
33426 # 3226 "ssl/ssl_lib.c" 3 4
33427 ((void *)0)
33428 # 3226 "ssl/ssl_lib.c"
33429 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
33430 # 3226 "ssl/ssl_lib.c" 3 4
33431 ((void *)0)
33432 # 3226 "ssl/ssl_lib.c"
33433 )));
33434
33435 if (sc ==
33436 # 3228 "ssl/ssl_lib.c" 3 4
33437 ((void *)0)
33438 # 3228 "ssl/ssl_lib.c"
33439 || !sc->server)
33440 return
33441 # 3229 "ssl/ssl_lib.c" 3 4
33442 ((void *)0)
33443 # 3229 "ssl/ssl_lib.c"
33444 ;
33445 return sc->peer_ciphers;
33446 }
33447
33448 struct stack_st_SSL_CIPHER *SSL_get1_supported_ciphers(SSL *s)
33449 {
33450 struct stack_st_SSL_CIPHER *sk =
33451 # 3235 "ssl/ssl_lib.c" 3 4
33452 ((void *)0)
33453 # 3235 "ssl/ssl_lib.c"
33454 , *ciphers;
33455 int i;
33456 SSL_CONNECTION *sc = ((s) ==
33457 # 3237 "ssl/ssl_lib.c" 3 4
33458 ((void *)0)
33459 # 3237 "ssl/ssl_lib.c"
33460 ?
33461 # 3237 "ssl/ssl_lib.c" 3 4
33462 ((void *)0)
33463 # 3237 "ssl/ssl_lib.c"
33464 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
33465 # 3237 "ssl/ssl_lib.c" 3 4
33466 ((void *)0)
33467 # 3237 "ssl/ssl_lib.c"
33468 )));
33469
33470 if (sc ==
33471 # 3239 "ssl/ssl_lib.c" 3 4
33472 ((void *)0)
33473 # 3239 "ssl/ssl_lib.c"
33474 )
33475 return
33476 # 3240 "ssl/ssl_lib.c" 3 4
33477 ((void *)0)
33478 # 3240 "ssl/ssl_lib.c"
33479 ;
33480
33481 ciphers = SSL_get_ciphers(s);
33482 if (!ciphers)
33483 return
33484 # 3244 "ssl/ssl_lib.c" 3 4
33485 ((void *)0)
33486 # 3244 "ssl/ssl_lib.c"
33487 ;
33488 if (!ssl_set_client_disabled(sc))
33489 return
33490 # 3246 "ssl/ssl_lib.c" 3 4
33491 ((void *)0)
33492 # 3246 "ssl/ssl_lib.c"
33493 ;
33494 for (i = 0; i < OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(ciphers)); i++) {
33495 const SSL_CIPHER *c = ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(ciphers), (i)));
33496 if (!ssl_cipher_disabled(sc, c, (1 | (1 << 16)), 0)) {
33497 if (!sk)
33498 sk = ((struct stack_st_SSL_CIPHER *)OPENSSL_sk_new_null());
33499 if (!sk)
33500 return
33501 # 3253 "ssl/ssl_lib.c" 3 4
33502 ((void *)0)
33503 # 3253 "ssl/ssl_lib.c"
33504 ;
33505 if (!OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(c))) {
33506 OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk));
33507 return
33508 # 3256 "ssl/ssl_lib.c" 3 4
33509 ((void *)0)
33510 # 3256 "ssl/ssl_lib.c"
33511 ;
33512 }
33513 }
33514 }
33515 return sk;
33516 }
33517
33518
33519
33520 struct stack_st_SSL_CIPHER *ssl_get_ciphers_by_id(SSL_CONNECTION *s)
33521 {
33522 if (s !=
33523 # 3267 "ssl/ssl_lib.c" 3 4
33524 ((void *)0)
33525 # 3267 "ssl/ssl_lib.c"
33526 ) {
33527 if (s->cipher_list_by_id !=
33528 # 3268 "ssl/ssl_lib.c" 3 4
33529 ((void *)0)
33530 # 3268 "ssl/ssl_lib.c"
33531 )
33532 return s->cipher_list_by_id;
33533 else if (s->ssl.ctx !=
33534 # 3270 "ssl/ssl_lib.c" 3 4
33535 ((void *)0)
33536
33537 # 3271 "ssl/ssl_lib.c"
33538 && s->ssl.ctx->cipher_list_by_id !=
33539 # 3271 "ssl/ssl_lib.c" 3 4
33540 ((void *)0)
33541 # 3271 "ssl/ssl_lib.c"
33542 )
33543 return s->ssl.ctx->cipher_list_by_id;
33544 }
33545 return
33546 # 3274 "ssl/ssl_lib.c" 3 4
33547 ((void *)0)
33548 # 3274 "ssl/ssl_lib.c"
33549 ;
33550 }
33551
33552
33553 const char *SSL_get_cipher_list(const SSL *s, int n)
33554 {
33555 const SSL_CIPHER *c;
33556 struct stack_st_SSL_CIPHER *sk;
33557
33558 if (s ==
33559 # 3283 "ssl/ssl_lib.c" 3 4
33560 ((void *)0)
33561 # 3283 "ssl/ssl_lib.c"
33562 )
33563 return
33564 # 3284 "ssl/ssl_lib.c" 3 4
33565 ((void *)0)
33566 # 3284 "ssl/ssl_lib.c"
33567 ;
33568 sk = SSL_get_ciphers(s);
33569 if ((sk ==
33570 # 3286 "ssl/ssl_lib.c" 3 4
33571 ((void *)0)
33572 # 3286 "ssl/ssl_lib.c"
33573 ) || (OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk)) <= n))
33574 return
33575 # 3287 "ssl/ssl_lib.c" 3 4
33576 ((void *)0)
33577 # 3287 "ssl/ssl_lib.c"
33578 ;
33579 c = ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (n)));
33580 if (c ==
33581 # 3289 "ssl/ssl_lib.c" 3 4
33582 ((void *)0)
33583 # 3289 "ssl/ssl_lib.c"
33584 )
33585 return
33586 # 3290 "ssl/ssl_lib.c" 3 4
33587 ((void *)0)
33588 # 3290 "ssl/ssl_lib.c"
33589 ;
33590 return c->name;
33591 }
33592
33593
33594
33595 struct stack_st_SSL_CIPHER *SSL_CTX_get_ciphers(const SSL_CTX *ctx)
33596 {
33597 if (ctx !=
33598 # 3298 "ssl/ssl_lib.c" 3 4
33599 ((void *)0)
33600 # 3298 "ssl/ssl_lib.c"
33601 )
33602 return ctx->cipher_list;
33603 return
33604 # 3300 "ssl/ssl_lib.c" 3 4
33605 ((void *)0)
33606 # 3300 "ssl/ssl_lib.c"
33607 ;
33608 }
33609
33610
33611
33612
33613
33614 static int cipher_list_tls12_num(struct stack_st_SSL_CIPHER *sk)
33615 {
33616 int i, num = 0;
33617 const SSL_CIPHER *c;
33618
33619 if (sk ==
33620 # 3312 "ssl/ssl_lib.c" 3 4
33621 ((void *)0)
33622 # 3312 "ssl/ssl_lib.c"
33623 )
33624 return 0;
33625 for (i = 0; i < OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk)); ++i) {
33626 c = ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (i)));
33627 if (c->min_tls >= 0x0304)
33628 continue;
33629 num++;
33630 }
33631 return num;
33632 }
33633
33634
33635 int SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str)
33636 {
33637 struct stack_st_SSL_CIPHER *sk;
33638
33639 sk = ssl_create_cipher_list(ctx, ctx->tls13_ciphersuites,
33640 &ctx->cipher_list, &ctx->cipher_list_by_id, str,
33641 ctx->cert);
33642
33643
33644
33645
33646
33647
33648
33649 if (sk ==
33650 # 3338 "ssl/ssl_lib.c" 3 4
33651 ((void *)0)
33652 # 3338 "ssl/ssl_lib.c"
33653 )
33654 return 0;
33655 else if (cipher_list_tls12_num(sk) == 0) {
33656 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3341,__func__), ERR_set_error)((20),(185),
33657 # 3341 "ssl/ssl_lib.c" 3 4
33658 ((void *)0)
33659 # 3341 "ssl/ssl_lib.c"
33660 );
33661 return 0;
33662 }
33663 return 1;
33664 }
33665
33666
33667 int SSL_set_cipher_list(SSL *s, const char *str)
33668 {
33669 struct stack_st_SSL_CIPHER *sk;
33670 SSL_CONNECTION *sc = ((s) ==
33671 # 3351 "ssl/ssl_lib.c" 3 4
33672 ((void *)0)
33673 # 3351 "ssl/ssl_lib.c"
33674 ?
33675 # 3351 "ssl/ssl_lib.c" 3 4
33676 ((void *)0)
33677 # 3351 "ssl/ssl_lib.c"
33678 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
33679 # 3351 "ssl/ssl_lib.c" 3 4
33680 ((void *)0)
33681 # 3351 "ssl/ssl_lib.c"
33682 )));
33683
33684 if (sc ==
33685 # 3353 "ssl/ssl_lib.c" 3 4
33686 ((void *)0)
33687 # 3353 "ssl/ssl_lib.c"
33688 )
33689 return 0;
33690
33691 sk = ssl_create_cipher_list(s->ctx, sc->tls13_ciphersuites,
33692 &sc->cipher_list, &sc->cipher_list_by_id, str,
33693 sc->cert);
33694
33695 if (sk ==
33696 # 3360 "ssl/ssl_lib.c" 3 4
33697 ((void *)0)
33698 # 3360 "ssl/ssl_lib.c"
33699 )
33700 return 0;
33701 else if (cipher_list_tls12_num(sk) == 0) {
33702 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3363,__func__), ERR_set_error)((20),(185),
33703 # 3363 "ssl/ssl_lib.c" 3 4
33704 ((void *)0)
33705 # 3363 "ssl/ssl_lib.c"
33706 );
33707 return 0;
33708 }
33709 return 1;
33710 }
33711
33712 char *SSL_get_shared_ciphers(const SSL *s, char *buf, int size)
33713 {
33714 char *p;
33715 struct stack_st_SSL_CIPHER *clntsk, *srvrsk;
33716 const SSL_CIPHER *c;
33717 int i;
33718 const SSL_CONNECTION *sc = ((s) ==
33719 # 3375 "ssl/ssl_lib.c" 3 4
33720 ((void *)0)
33721 # 3375 "ssl/ssl_lib.c"
33722 ?
33723 # 3375 "ssl/ssl_lib.c" 3 4
33724 ((void *)0)
33725 # 3375 "ssl/ssl_lib.c"
33726 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
33727 # 3375 "ssl/ssl_lib.c" 3 4
33728 ((void *)0)
33729 # 3375 "ssl/ssl_lib.c"
33730 )));
33731
33732 if (sc ==
33733 # 3377 "ssl/ssl_lib.c" 3 4
33734 ((void *)0)
33735 # 3377 "ssl/ssl_lib.c"
33736 )
33737 return
33738 # 3378 "ssl/ssl_lib.c" 3 4
33739 ((void *)0)
33740 # 3378 "ssl/ssl_lib.c"
33741 ;
33742
33743 if (!sc->server
33744 || sc->peer_ciphers ==
33745 # 3381 "ssl/ssl_lib.c" 3 4
33746 ((void *)0)
33747
33748 # 3382 "ssl/ssl_lib.c"
33749 || size < 2)
33750 return
33751 # 3383 "ssl/ssl_lib.c" 3 4
33752 ((void *)0)
33753 # 3383 "ssl/ssl_lib.c"
33754 ;
33755
33756 p = buf;
33757 clntsk = sc->peer_ciphers;
33758 srvrsk = SSL_get_ciphers(s);
33759 if (clntsk ==
33760 # 3388 "ssl/ssl_lib.c" 3 4
33761 ((void *)0)
33762 # 3388 "ssl/ssl_lib.c"
33763 || srvrsk ==
33764 # 3388 "ssl/ssl_lib.c" 3 4
33765 ((void *)0)
33766 # 3388 "ssl/ssl_lib.c"
33767 )
33768 return
33769 # 3389 "ssl/ssl_lib.c" 3 4
33770 ((void *)0)
33771 # 3389 "ssl/ssl_lib.c"
33772 ;
33773
33774 if (OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(clntsk)) == 0 || OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(srvrsk)) == 0)
33775 return
33776 # 3392 "ssl/ssl_lib.c" 3 4
33777 ((void *)0)
33778 # 3392 "ssl/ssl_lib.c"
33779 ;
33780
33781 for (i = 0; i < OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(clntsk)); i++) {
33782 int n;
33783
33784 c = ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(clntsk), (i)));
33785 if (OPENSSL_sk_find(ossl_check_SSL_CIPHER_sk_type(srvrsk), ossl_check_SSL_CIPHER_type(c)) < 0)
33786 continue;
33787
33788 n = OPENSSL_strnlen(c->name, size);
33789 if (n >= size) {
33790 if (p != buf)
33791 --p;
33792 *p = '\0';
33793 return buf;
33794 }
33795 memcpy(p, c->name, n);
33796 p += n;
33797 *(p++) = ':';
33798 size -= n + 1;
33799 }
33800 p[-1] = '\0';
33801 return buf;
33802 }
33803 # 3427 "ssl/ssl_lib.c"
33804 const char *SSL_get_servername(const SSL *s, const int type)
33805 {
33806 const SSL_CONNECTION *sc = ((s) ==
33807 # 3429 "ssl/ssl_lib.c" 3 4
33808 ((void *)0)
33809 # 3429 "ssl/ssl_lib.c"
33810 ?
33811 # 3429 "ssl/ssl_lib.c" 3 4
33812 ((void *)0)
33813 # 3429 "ssl/ssl_lib.c"
33814 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
33815 # 3429 "ssl/ssl_lib.c" 3 4
33816 ((void *)0)
33817 # 3429 "ssl/ssl_lib.c"
33818 )));
33819 int server;
33820
33821 if (sc ==
33822 # 3432 "ssl/ssl_lib.c" 3 4
33823 ((void *)0)
33824 # 3432 "ssl/ssl_lib.c"
33825 )
33826 return
33827 # 3433 "ssl/ssl_lib.c" 3 4
33828 ((void *)0)
33829 # 3433 "ssl/ssl_lib.c"
33830 ;
33831
33832
33833
33834
33835
33836 server = sc->handshake_func ==
33837 # 3439 "ssl/ssl_lib.c" 3 4
33838 ((void *)0)
33839 # 3439 "ssl/ssl_lib.c"
33840 ? 0 : sc->server;
33841
33842 if (type != 0)
33843 return
33844 # 3442 "ssl/ssl_lib.c" 3 4
33845 ((void *)0)
33846 # 3442 "ssl/ssl_lib.c"
33847 ;
33848
33849 if (server) {
33850 # 3461 "ssl/ssl_lib.c"
33851 if (sc->hit && !(!((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(sc)->ssl)->method->version >= 0x0304 && (&(sc)->ssl)->method->version != 0x10000))
33852 return sc->session->ext.hostname;
33853 } else {
33854 # 3486 "ssl/ssl_lib.c"
33855 if (SSL_in_before(s)) {
33856 if (sc->ext.hostname ==
33857 # 3487 "ssl/ssl_lib.c" 3 4
33858 ((void *)0)
33859
33860 # 3488 "ssl/ssl_lib.c"
33861 && sc->session !=
33862 # 3488 "ssl/ssl_lib.c" 3 4
33863 ((void *)0)
33864
33865 # 3489 "ssl/ssl_lib.c"
33866 && sc->session->ssl_version != 0x0304)
33867 return sc->session->ext.hostname;
33868 } else {
33869 if (!(!((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(sc)->ssl)->method->version >= 0x0304 && (&(sc)->ssl)->method->version != 0x10000) && sc->hit
33870 && sc->session->ext.hostname !=
33871 # 3493 "ssl/ssl_lib.c" 3 4
33872 ((void *)0)
33873 # 3493 "ssl/ssl_lib.c"
33874 )
33875 return sc->session->ext.hostname;
33876 }
33877 }
33878
33879 return sc->ext.hostname;
33880 }
33881
33882 int SSL_get_servername_type(const SSL *s)
33883 {
33884 if (SSL_get_servername(s, 0) !=
33885 # 3503 "ssl/ssl_lib.c" 3 4
33886 ((void *)0)
33887 # 3503 "ssl/ssl_lib.c"
33888 )
33889 return 0;
33890 return -1;
33891 }
33892 # 3528 "ssl/ssl_lib.c"
33893 int SSL_select_next_proto(unsigned char **out, unsigned char *outlen,
33894 const unsigned char *server,
33895 unsigned int server_len,
33896 const unsigned char *client, unsigned int client_len)
33897 {
33898 unsigned int i, j;
33899 const unsigned char *result;
33900 int status = 0;
33901
33902
33903
33904
33905 for (i = 0; i < server_len;) {
33906 for (j = 0; j < client_len;) {
33907 if (server[i] == client[j] &&
33908 memcmp(&server[i + 1], &client[j + 1], server[i]) == 0) {
33909
33910 result = &server[i];
33911 status = 1;
33912 goto found;
33913 }
33914 j += client[j];
33915 j++;
33916 }
33917 i += server[i];
33918 i++;
33919 }
33920
33921
33922 result = client;
33923 status = 2;
33924
33925 found:
33926 *out = (unsigned char *)result + 1;
33927 *outlen = result[0];
33928 return status;
33929 }
33930 # 3575 "ssl/ssl_lib.c"
33931 void SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data,
33932 unsigned *len)
33933 {
33934 const SSL_CONNECTION *sc = ((s) ==
33935 # 3578 "ssl/ssl_lib.c" 3 4
33936 ((void *)0)
33937 # 3578 "ssl/ssl_lib.c"
33938 ?
33939 # 3578 "ssl/ssl_lib.c" 3 4
33940 ((void *)0)
33941 # 3578 "ssl/ssl_lib.c"
33942 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
33943 # 3578 "ssl/ssl_lib.c" 3 4
33944 ((void *)0)
33945 # 3578 "ssl/ssl_lib.c"
33946 )));
33947
33948 if (sc ==
33949 # 3580 "ssl/ssl_lib.c" 3 4
33950 ((void *)0)
33951 # 3580 "ssl/ssl_lib.c"
33952 ) {
33953
33954 *data =
33955 # 3582 "ssl/ssl_lib.c" 3 4
33956 ((void *)0)
33957 # 3582 "ssl/ssl_lib.c"
33958 ;
33959 *len = 0;
33960 return;
33961 }
33962
33963 *data = sc->ext.npn;
33964 if (*data ==
33965 # 3588 "ssl/ssl_lib.c" 3 4
33966 ((void *)0)
33967 # 3588 "ssl/ssl_lib.c"
33968 ) {
33969 *len = 0;
33970 } else {
33971 *len = (unsigned int)sc->ext.npn_len;
33972 }
33973 }
33974 # 3605 "ssl/ssl_lib.c"
33975 void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *ctx,
33976 SSL_CTX_npn_advertised_cb_func cb,
33977 void *arg)
33978 {
33979 if ((((ctx)->method) == OSSL_QUIC_client_method() || ((ctx)->method) == OSSL_QUIC_client_thread_method()))
33980
33981 return;
33982
33983 ctx->ext.npn_advertised_cb = cb;
33984 ctx->ext.npn_advertised_cb_arg = arg;
33985 }
33986 # 3627 "ssl/ssl_lib.c"
33987 void SSL_CTX_set_next_proto_select_cb(SSL_CTX *ctx,
33988 SSL_CTX_npn_select_cb_func cb,
33989 void *arg)
33990 {
33991 if ((((ctx)->method) == OSSL_QUIC_client_method() || ((ctx)->method) == OSSL_QUIC_client_thread_method()))
33992
33993 return;
33994
33995 ctx->ext.npn_select_cb = cb;
33996 ctx->ext.npn_select_cb_arg = arg;
33997 }
33998
33999
34000 static int alpn_value_ok(const unsigned char *protos, unsigned int protos_len)
34001 {
34002 unsigned int idx;
34003
34004 if (protos_len < 2 || protos ==
34005 # 3644 "ssl/ssl_lib.c" 3 4
34006 ((void *)0)
34007 # 3644 "ssl/ssl_lib.c"
34008 )
34009 return 0;
34010
34011 for (idx = 0; idx < protos_len; idx += protos[idx] + 1) {
34012 if (protos[idx] == 0)
34013 return 0;
34014 }
34015 return idx == protos_len;
34016 }
34017
34018
34019
34020
34021
34022 int SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos,
34023 unsigned int protos_len)
34024 {
34025 unsigned char *alpn;
34026
34027 if (protos_len == 0 || protos ==
34028 # 3663 "ssl/ssl_lib.c" 3 4
34029 ((void *)0)
34030 # 3663 "ssl/ssl_lib.c"
34031 ) {
34032 CRYPTO_free(ctx->ext.alpn, "ssl/ssl_lib.c", 3664);
34033 ctx->ext.alpn =
34034 # 3665 "ssl/ssl_lib.c" 3 4
34035 ((void *)0)
34036 # 3665 "ssl/ssl_lib.c"
34037 ;
34038 ctx->ext.alpn_len = 0;
34039 return 0;
34040 }
34041
34042 if (!alpn_value_ok(protos, protos_len))
34043 return 1;
34044
34045 alpn = CRYPTO_memdup((protos), protos_len, "ssl/ssl_lib.c", 3673);
34046 if (alpn ==
34047 # 3674 "ssl/ssl_lib.c" 3 4
34048 ((void *)0)
34049 # 3674 "ssl/ssl_lib.c"
34050 )
34051 return 1;
34052 CRYPTO_free(ctx->ext.alpn, "ssl/ssl_lib.c", 3676);
34053 ctx->ext.alpn = alpn;
34054 ctx->ext.alpn_len = protos_len;
34055
34056 return 0;
34057 }
34058
34059
34060
34061
34062
34063
34064 int SSL_set_alpn_protos(SSL *ssl, const unsigned char *protos,
34065 unsigned int protos_len)
34066 {
34067 unsigned char *alpn;
34068 SSL_CONNECTION *sc = ((ssl) ==
34069 # 3692 "ssl/ssl_lib.c" 3 4
34070 ((void *)0)
34071 # 3692 "ssl/ssl_lib.c"
34072 ?
34073 # 3692 "ssl/ssl_lib.c" 3 4
34074 ((void *)0)
34075 # 3692 "ssl/ssl_lib.c"
34076 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls :
34077 # 3692 "ssl/ssl_lib.c" 3 4
34078 ((void *)0)
34079 # 3692 "ssl/ssl_lib.c"
34080 )));
34081
34082 if (sc ==
34083 # 3694 "ssl/ssl_lib.c" 3 4
34084 ((void *)0)
34085 # 3694 "ssl/ssl_lib.c"
34086 )
34087 return 1;
34088
34089 if (protos_len == 0 || protos ==
34090 # 3697 "ssl/ssl_lib.c" 3 4
34091 ((void *)0)
34092 # 3697 "ssl/ssl_lib.c"
34093 ) {
34094 CRYPTO_free(sc->ext.alpn, "ssl/ssl_lib.c", 3698);
34095 sc->ext.alpn =
34096 # 3699 "ssl/ssl_lib.c" 3 4
34097 ((void *)0)
34098 # 3699 "ssl/ssl_lib.c"
34099 ;
34100 sc->ext.alpn_len = 0;
34101 return 0;
34102 }
34103
34104 if (!alpn_value_ok(protos, protos_len))
34105 return 1;
34106
34107 alpn = CRYPTO_memdup((protos), protos_len, "ssl/ssl_lib.c", 3707);
34108 if (alpn ==
34109 # 3708 "ssl/ssl_lib.c" 3 4
34110 ((void *)0)
34111 # 3708 "ssl/ssl_lib.c"
34112 )
34113 return 1;
34114 CRYPTO_free(sc->ext.alpn, "ssl/ssl_lib.c", 3710);
34115 sc->ext.alpn = alpn;
34116 sc->ext.alpn_len = protos_len;
34117
34118 return 0;
34119 }
34120
34121
34122
34123
34124
34125
34126 void SSL_CTX_set_alpn_select_cb(SSL_CTX *ctx,
34127 SSL_CTX_alpn_select_cb_func cb,
34128 void *arg)
34129 {
34130 ctx->ext.alpn_select_cb = cb;
34131 ctx->ext.alpn_select_cb_arg = arg;
34132 }
34133
34134
34135
34136
34137
34138
34139
34140 void SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data,
34141 unsigned int *len)
34142 {
34143 const SSL_CONNECTION *sc = ((ssl) ==
34144 # 3739 "ssl/ssl_lib.c" 3 4
34145 ((void *)0)
34146 # 3739 "ssl/ssl_lib.c"
34147 ?
34148 # 3739 "ssl/ssl_lib.c" 3 4
34149 ((void *)0)
34150 # 3739 "ssl/ssl_lib.c"
34151 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls :
34152 # 3739 "ssl/ssl_lib.c" 3 4
34153 ((void *)0)
34154 # 3739 "ssl/ssl_lib.c"
34155 )));
34156
34157 if (sc ==
34158 # 3741 "ssl/ssl_lib.c" 3 4
34159 ((void *)0)
34160 # 3741 "ssl/ssl_lib.c"
34161 ) {
34162
34163 *data =
34164 # 3743 "ssl/ssl_lib.c" 3 4
34165 ((void *)0)
34166 # 3743 "ssl/ssl_lib.c"
34167 ;
34168 *len = 0;
34169 return;
34170 }
34171
34172 *data = sc->s3.alpn_selected;
34173 if (*data ==
34174 # 3749 "ssl/ssl_lib.c" 3 4
34175 ((void *)0)
34176 # 3749 "ssl/ssl_lib.c"
34177 )
34178 *len = 0;
34179 else
34180 *len = (unsigned int)sc->s3.alpn_selected_len;
34181 }
34182
34183 int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
34184 const char *label, size_t llen,
34185 const unsigned char *context, size_t contextlen,
34186 int use_context)
34187 {
34188 SSL_CONNECTION *sc = ((s) ==
34189 # 3760 "ssl/ssl_lib.c" 3 4
34190 ((void *)0)
34191 # 3760 "ssl/ssl_lib.c"
34192 ?
34193 # 3760 "ssl/ssl_lib.c" 3 4
34194 ((void *)0)
34195 # 3760 "ssl/ssl_lib.c"
34196 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
34197 # 3760 "ssl/ssl_lib.c" 3 4
34198 ((void *)0)
34199 # 3760 "ssl/ssl_lib.c"
34200 )));
34201
34202 if (sc ==
34203 # 3762 "ssl/ssl_lib.c" 3 4
34204 ((void *)0)
34205 # 3762 "ssl/ssl_lib.c"
34206 )
34207 return -1;
34208
34209 if (sc->session ==
34210 # 3765 "ssl/ssl_lib.c" 3 4
34211 ((void *)0)
34212
34213 # 3766 "ssl/ssl_lib.c"
34214 || (sc->version < 0x0301 && sc->version != 0x0100))
34215 return -1;
34216
34217 return sc->ssl.method->ssl3_enc->export_keying_material(sc, out, olen, label,
34218 llen, context,
34219 contextlen,
34220 use_context);
34221 }
34222
34223 int SSL_export_keying_material_early(SSL *s, unsigned char *out, size_t olen,
34224 const char *label, size_t llen,
34225 const unsigned char *context,
34226 size_t contextlen)
34227 {
34228 SSL_CONNECTION *sc = ((s) ==
34229 # 3780 "ssl/ssl_lib.c" 3 4
34230 ((void *)0)
34231 # 3780 "ssl/ssl_lib.c"
34232 ?
34233 # 3780 "ssl/ssl_lib.c" 3 4
34234 ((void *)0)
34235 # 3780 "ssl/ssl_lib.c"
34236 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
34237 # 3780 "ssl/ssl_lib.c" 3 4
34238 ((void *)0)
34239 # 3780 "ssl/ssl_lib.c"
34240 )));
34241
34242 if (sc ==
34243 # 3782 "ssl/ssl_lib.c" 3 4
34244 ((void *)0)
34245 # 3782 "ssl/ssl_lib.c"
34246 )
34247 return -1;
34248
34249 if (sc->version != 0x0304)
34250 return 0;
34251
34252 return tls13_export_keying_material_early(sc, out, olen, label, llen,
34253 context, contextlen);
34254 }
34255
34256 static unsigned long ssl_session_hash(const SSL_SESSION *a)
34257 {
34258 const unsigned char *session_id = a->session_id;
34259 unsigned long l;
34260 unsigned char tmp_storage[4];
34261
34262 if (a->session_id_length < sizeof(tmp_storage)) {
34263 memset(tmp_storage, 0, sizeof(tmp_storage));
34264 memcpy(tmp_storage, a->session_id, a->session_id_length);
34265 session_id = tmp_storage;
34266 }
34267
34268 l = (unsigned long)
34269 ((unsigned long)session_id[0]) |
34270 ((unsigned long)session_id[1] << 8L) |
34271 ((unsigned long)session_id[2] << 16L) |
34272 ((unsigned long)session_id[3] << 24L);
34273 return l;
34274 }
34275 # 3819 "ssl/ssl_lib.c"
34276 static int ssl_session_cmp(const SSL_SESSION *a, const SSL_SESSION *b)
34277 {
34278 if (a->ssl_version != b->ssl_version)
34279 return 1;
34280 if (a->session_id_length != b->session_id_length)
34281 return 1;
34282 return memcmp(a->session_id, b->session_id, a->session_id_length);
34283 }
34284 # 3835 "ssl/ssl_lib.c"
34285 SSL_CTX *SSL_CTX_new_ex(OSSL_LIB_CTX *libctx, const char *propq,
34286 const SSL_METHOD *meth)
34287 {
34288 SSL_CTX *ret =
34289 # 3838 "ssl/ssl_lib.c" 3 4
34290 ((void *)0)
34291 # 3838 "ssl/ssl_lib.c"
34292 ;
34293
34294
34295
34296
34297 if (meth ==
34298 # 3843 "ssl/ssl_lib.c" 3 4
34299 ((void *)0)
34300 # 3843 "ssl/ssl_lib.c"
34301 ) {
34302 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3844,__func__), ERR_set_error)((20),(196),
34303 # 3844 "ssl/ssl_lib.c" 3 4
34304 ((void *)0)
34305 # 3844 "ssl/ssl_lib.c"
34306 );
34307 return
34308 # 3845 "ssl/ssl_lib.c" 3 4
34309 ((void *)0)
34310 # 3845 "ssl/ssl_lib.c"
34311 ;
34312 }
34313
34314 if (!OPENSSL_init_ssl(0x00200000L,
34315 # 3848 "ssl/ssl_lib.c" 3 4
34316 ((void *)0)
34317 # 3848 "ssl/ssl_lib.c"
34318 ))
34319 return
34320 # 3849 "ssl/ssl_lib.c" 3 4
34321 ((void *)0)
34322 # 3849 "ssl/ssl_lib.c"
34323 ;
34324
34325
34326 if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0) {
34327 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3853,__func__), ERR_set_error)((20),(269),
34328 # 3853 "ssl/ssl_lib.c" 3 4
34329 ((void *)0)
34330 # 3853 "ssl/ssl_lib.c"
34331 );
34332 goto err;
34333 }
34334
34335 ret = CRYPTO_zalloc(sizeof(*ret), "ssl/ssl_lib.c", 3857);
34336 if (ret ==
34337 # 3858 "ssl/ssl_lib.c" 3 4
34338 ((void *)0)
34339 # 3858 "ssl/ssl_lib.c"
34340 )
34341 return
34342 # 3859 "ssl/ssl_lib.c" 3 4
34343 ((void *)0)
34344 # 3859 "ssl/ssl_lib.c"
34345 ;
34346
34347
34348 if (!CRYPTO_NEW_REF(&ret->references, 1)) {
34349 CRYPTO_free(ret, "ssl/ssl_lib.c", 3863);
34350 return
34351 # 3864 "ssl/ssl_lib.c" 3 4
34352 ((void *)0)
34353 # 3864 "ssl/ssl_lib.c"
34354 ;
34355 }
34356
34357 ret->lock = CRYPTO_THREAD_lock_new();
34358 if (ret->lock ==
34359 # 3868 "ssl/ssl_lib.c" 3 4
34360 ((void *)0)
34361 # 3868 "ssl/ssl_lib.c"
34362 ) {
34363 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3869,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
34364 # 3869 "ssl/ssl_lib.c" 3 4
34365 ((void *)0)
34366 # 3869 "ssl/ssl_lib.c"
34367 );
34368 goto err;
34369 }
34370 # 3881 "ssl/ssl_lib.c"
34371 ret->libctx = libctx;
34372 if (propq !=
34373 # 3882 "ssl/ssl_lib.c" 3 4
34374 ((void *)0)
34375 # 3882 "ssl/ssl_lib.c"
34376 ) {
34377 ret->propq = CRYPTO_strdup(propq, "ssl/ssl_lib.c", 3883);
34378 if (ret->propq ==
34379 # 3884 "ssl/ssl_lib.c" 3 4
34380 ((void *)0)
34381 # 3884 "ssl/ssl_lib.c"
34382 )
34383 goto err;
34384 }
34385
34386 ret->method = meth;
34387 ret->min_proto_version = 0;
34388 ret->max_proto_version = 0;
34389 ret->mode = 0x00000004U;
34390 ret->session_cache_mode = 0x0002;
34391 ret->session_cache_size = (1024*20);
34392
34393 ret->session_timeout = meth->get_timeout();
34394 ret->max_cert_list = (1024*100);
34395 ret->verify_mode = 0x00;
34396
34397 ret->sessions = lh_SSL_SESSION_new(ssl_session_hash, ssl_session_cmp);
34398 if (ret->sessions ==
34399 # 3900 "ssl/ssl_lib.c" 3 4
34400 ((void *)0)
34401 # 3900 "ssl/ssl_lib.c"
34402 ) {
34403 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3901,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
34404 # 3901 "ssl/ssl_lib.c" 3 4
34405 ((void *)0)
34406 # 3901 "ssl/ssl_lib.c"
34407 );
34408 goto err;
34409 }
34410 ret->cert_store = X509_STORE_new();
34411 if (ret->cert_store ==
34412 # 3905 "ssl/ssl_lib.c" 3 4
34413 ((void *)0)
34414 # 3905 "ssl/ssl_lib.c"
34415 ) {
34416 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3906,__func__), ERR_set_error)((20),((11 | (0x2 << 18L))),
34417 # 3906 "ssl/ssl_lib.c" 3 4
34418 ((void *)0)
34419 # 3906 "ssl/ssl_lib.c"
34420 );
34421 goto err;
34422 }
34423
34424 ret->ctlog_store = CTLOG_STORE_new_ex(libctx, propq);
34425 if (ret->ctlog_store ==
34426 # 3911 "ssl/ssl_lib.c" 3 4
34427 ((void *)0)
34428 # 3911 "ssl/ssl_lib.c"
34429 ) {
34430 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3912,__func__), ERR_set_error)((20),((50 | (0x2 << 18L))),
34431 # 3912 "ssl/ssl_lib.c" 3 4
34432 ((void *)0)
34433 # 3912 "ssl/ssl_lib.c"
34434 );
34435 goto err;
34436 }
34437
34438
34439
34440 if (!ssl_load_ciphers(ret)) {
34441 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3919,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
34442 # 3919 "ssl/ssl_lib.c" 3 4
34443 ((void *)0)
34444 # 3919 "ssl/ssl_lib.c"
34445 );
34446 goto err;
34447 }
34448
34449 if (!ssl_load_groups(ret)) {
34450 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3924,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
34451 # 3924 "ssl/ssl_lib.c" 3 4
34452 ((void *)0)
34453 # 3924 "ssl/ssl_lib.c"
34454 );
34455 goto err;
34456 }
34457
34458
34459 if (!ssl_load_sigalgs(ret)) {
34460 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3930,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
34461 # 3930 "ssl/ssl_lib.c" 3 4
34462 ((void *)0)
34463 # 3930 "ssl/ssl_lib.c"
34464 );
34465 goto err;
34466 }
34467
34468
34469 if (!ssl_setup_sigalgs(ret)) {
34470 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3936,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
34471 # 3936 "ssl/ssl_lib.c" 3 4
34472 ((void *)0)
34473 # 3936 "ssl/ssl_lib.c"
34474 );
34475 goto err;
34476 }
34477
34478 if (!SSL_CTX_set_ciphersuites(ret, OSSL_default_ciphersuites())) {
34479 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3941,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
34480 # 3941 "ssl/ssl_lib.c" 3 4
34481 ((void *)0)
34482 # 3941 "ssl/ssl_lib.c"
34483 );
34484 goto err;
34485 }
34486
34487 if ((ret->cert = ssl_cert_new(9 + ret->sigalg_list_len)) ==
34488 # 3945 "ssl/ssl_lib.c" 3 4
34489 ((void *)0)
34490 # 3945 "ssl/ssl_lib.c"
34491 ) {
34492 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3946,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
34493 # 3946 "ssl/ssl_lib.c" 3 4
34494 ((void *)0)
34495 # 3946 "ssl/ssl_lib.c"
34496 );
34497 goto err;
34498 }
34499
34500 if (!ssl_create_cipher_list(ret,
34501 ret->tls13_ciphersuites,
34502 &ret->cipher_list, &ret->cipher_list_by_id,
34503 OSSL_default_cipher_list(), ret->cert)
34504 || OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(ret->cipher_list)) <= 0) {
34505 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3955,__func__), ERR_set_error)((20),(161),
34506 # 3955 "ssl/ssl_lib.c" 3 4
34507 ((void *)0)
34508 # 3955 "ssl/ssl_lib.c"
34509 );
34510 goto err;
34511 }
34512
34513 ret->param = X509_VERIFY_PARAM_new();
34514 if (ret->param ==
34515 # 3960 "ssl/ssl_lib.c" 3 4
34516 ((void *)0)
34517 # 3960 "ssl/ssl_lib.c"
34518 ) {
34519 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3961,__func__), ERR_set_error)((20),((11 | (0x2 << 18L))),
34520 # 3961 "ssl/ssl_lib.c" 3 4
34521 ((void *)0)
34522 # 3961 "ssl/ssl_lib.c"
34523 );
34524 goto err;
34525 }
34526
34527
34528
34529
34530
34531 ret->md5 = ssl_evp_md_fetch(libctx, 4, propq);
34532 ret->sha1 = ssl_evp_md_fetch(libctx, 64, propq);
34533
34534 if ((ret->ca_names = ((struct stack_st_X509_NAME *)OPENSSL_sk_new_null())) ==
34535 # 3972 "ssl/ssl_lib.c" 3 4
34536 ((void *)0)
34537 # 3972 "ssl/ssl_lib.c"
34538 ) {
34539 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3973,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
34540 # 3973 "ssl/ssl_lib.c" 3 4
34541 ((void *)0)
34542 # 3973 "ssl/ssl_lib.c"
34543 );
34544 goto err;
34545 }
34546
34547 if ((ret->client_ca_names = ((struct stack_st_X509_NAME *)OPENSSL_sk_new_null())) ==
34548 # 3977 "ssl/ssl_lib.c" 3 4
34549 ((void *)0)
34550 # 3977 "ssl/ssl_lib.c"
34551 ) {
34552 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3978,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
34553 # 3978 "ssl/ssl_lib.c" 3 4
34554 ((void *)0)
34555 # 3978 "ssl/ssl_lib.c"
34556 );
34557 goto err;
34558 }
34559
34560 if (!CRYPTO_new_ex_data(1, ret, &ret->ex_data)) {
34561 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3983,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
34562 # 3983 "ssl/ssl_lib.c" 3 4
34563 ((void *)0)
34564 # 3983 "ssl/ssl_lib.c"
34565 );
34566 goto err;
34567 }
34568
34569 if ((ret->ext.secure = CRYPTO_secure_zalloc(sizeof(*ret->ext.secure), "ssl/ssl_lib.c", 3987)) ==
34570 # 3987 "ssl/ssl_lib.c" 3 4
34571 ((void *)0)
34572 # 3987 "ssl/ssl_lib.c"
34573 )
34574 goto err;
34575
34576
34577 if (!(meth->ssl3_enc->enc_flags & 0x8))
34578 ret->comp_methods = SSL_COMP_get_compression_methods();
34579
34580 ret->max_send_fragment = 16384;
34581 ret->split_send_fragment = 16384;
34582
34583
34584 if ((RAND_bytes_ex(libctx, ret->ext.tick_key_name,
34585 sizeof(ret->ext.tick_key_name), 0) <= 0)
34586 || (RAND_priv_bytes_ex(libctx, ret->ext.secure->tick_hmac_key,
34587 sizeof(ret->ext.secure->tick_hmac_key), 0) <= 0)
34588 || (RAND_priv_bytes_ex(libctx, ret->ext.secure->tick_aes_key,
34589 sizeof(ret->ext.secure->tick_aes_key), 0) <= 0))
34590 ret->options |= ((uint64_t)1 << (uint64_t)14);
34591
34592 if (RAND_priv_bytes_ex(libctx, ret->ext.cookie_hmac_key,
34593 sizeof(ret->ext.cookie_hmac_key), 0) <= 0) {
34594 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",4008,__func__), ERR_set_error)((20),((36 | (0x2 << 18L))),
34595 # 4008 "ssl/ssl_lib.c" 3 4
34596 ((void *)0)
34597 # 4008 "ssl/ssl_lib.c"
34598 );
34599 goto err;
34600 }
34601
34602
34603 if (!ssl_ctx_srp_ctx_init_intern(ret)) {
34604 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",4014,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
34605 # 4014 "ssl/ssl_lib.c" 3 4
34606 ((void *)0)
34607 # 4014 "ssl/ssl_lib.c"
34608 );
34609 goto err;
34610 }
34611 # 4059 "ssl/ssl_lib.c"
34612 ret->options |= ((uint64_t)1 << (uint64_t)17) | ((uint64_t)1 << (uint64_t)20);
34613
34614 ret->ext.status_type = -1;
34615 # 4079 "ssl/ssl_lib.c"
34616 ret->max_early_data = 0;
34617 # 4089 "ssl/ssl_lib.c"
34618 ret->recv_max_early_data = 16384;
34619
34620
34621 ret->num_tickets = 2;
34622
34623 ssl_ctx_system_config(ret);
34624
34625 return ret;
34626 err:
34627 SSL_CTX_free(ret);
34628 return
34629 # 4099 "ssl/ssl_lib.c" 3 4
34630 ((void *)0)
34631 # 4099 "ssl/ssl_lib.c"
34632 ;
34633 }
34634
34635 SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth)
34636 {
34637 return SSL_CTX_new_ex(
34638 # 4104 "ssl/ssl_lib.c" 3 4
34639 ((void *)0)
34640 # 4104 "ssl/ssl_lib.c"
34641 ,
34642 # 4104 "ssl/ssl_lib.c" 3 4
34643 ((void *)0)
34644 # 4104 "ssl/ssl_lib.c"
34645 , meth);
34646 }
34647
34648 int SSL_CTX_up_ref(SSL_CTX *ctx)
34649 {
34650 int i;
34651
34652 if (CRYPTO_UP_REF(&ctx->references, &i) <= 0)
34653 return 0;
34654
34655 ((void)0);;
34656 ;
34657 return ((i > 1) ? 1 : 0);
34658 }
34659
34660 void SSL_CTX_free(SSL_CTX *a)
34661 {
34662 int i;
34663 size_t j;
34664
34665 if (a ==
34666 # 4124 "ssl/ssl_lib.c" 3 4
34667 ((void *)0)
34668 # 4124 "ssl/ssl_lib.c"
34669 )
34670 return;
34671
34672 CRYPTO_DOWN_REF(&a->references, &i);
34673 ((void)0);;
34674 if (i > 0)
34675 return;
34676 ;
34677
34678 X509_VERIFY_PARAM_free(a->param);
34679 dane_ctx_final(&a->dane);
34680 # 4145 "ssl/ssl_lib.c"
34681 if (a->sessions !=
34682 # 4145 "ssl/ssl_lib.c" 3 4
34683 ((void *)0)
34684 # 4145 "ssl/ssl_lib.c"
34685 )
34686 SSL_CTX_flush_sessions(a, 0);
34687
34688 CRYPTO_free_ex_data(1, a, &a->ex_data);
34689 lh_SSL_SESSION_free(a->sessions);
34690 X509_STORE_free(a->cert_store);
34691
34692 CTLOG_STORE_free(a->ctlog_store);
34693
34694 OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(a->cipher_list));
34695 OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(a->cipher_list_by_id));
34696 OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(a->tls13_ciphersuites));
34697 ssl_cert_free(a->cert);
34698 OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(a->ca_names),ossl_check_X509_NAME_freefunc_type(X509_NAME_free));
34699 OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(a->client_ca_names),ossl_check_X509_NAME_freefunc_type(X509_NAME_free));
34700 OSSL_STACK_OF_X509_free(a->extra_certs);
34701 a->comp_methods =
34702 # 4161 "ssl/ssl_lib.c" 3 4
34703 ((void *)0)
34704 # 4161 "ssl/ssl_lib.c"
34705 ;
34706
34707 OPENSSL_sk_free(ossl_check_SRTP_PROTECTION_PROFILE_sk_type(a->srtp_profiles));
34708
34709
34710 ssl_ctx_srp_ctx_free_intern(a);
34711
34712
34713 tls_engine_finish(a->client_cert_engine);
34714
34715
34716 CRYPTO_free(a->ext.ecpointformats, "ssl/ssl_lib.c", 4172);
34717 CRYPTO_free(a->ext.supportedgroups, "ssl/ssl_lib.c", 4173);
34718 CRYPTO_free(a->ext.supported_groups_default, "ssl/ssl_lib.c", 4174);
34719 CRYPTO_free(a->ext.alpn, "ssl/ssl_lib.c", 4175);
34720 CRYPTO_secure_free(a->ext.secure, "ssl/ssl_lib.c", 4176);
34721
34722 ssl_evp_md_free(a->md5);
34723 ssl_evp_md_free(a->sha1);
34724
34725 for (j = 0; j < 24; j++)
34726 ssl_evp_cipher_free(a->ssl_cipher_methods[j]);
34727 for (j = 0; j < 14; j++)
34728 ssl_evp_md_free(a->ssl_digest_methods[j]);
34729 for (j = 0; j < a->group_list_len; j++) {
34730 CRYPTO_free(a->group_list[j].tlsname, "ssl/ssl_lib.c", 4186);
34731 CRYPTO_free(a->group_list[j].realname, "ssl/ssl_lib.c", 4187);
34732 CRYPTO_free(a->group_list[j].algorithm, "ssl/ssl_lib.c", 4188);
34733 }
34734 CRYPTO_free(a->group_list, "ssl/ssl_lib.c", 4190);
34735 for (j = 0; j < a->sigalg_list_len; j++) {
34736 CRYPTO_free(a->sigalg_list[j].name, "ssl/ssl_lib.c", 4192);
34737 CRYPTO_free(a->sigalg_list[j].sigalg_name, "ssl/ssl_lib.c", 4193);
34738 CRYPTO_free(a->sigalg_list[j].sigalg_oid, "ssl/ssl_lib.c", 4194);
34739 CRYPTO_free(a->sigalg_list[j].sig_name, "ssl/ssl_lib.c", 4195);
34740 CRYPTO_free(a->sigalg_list[j].sig_oid, "ssl/ssl_lib.c", 4196);
34741 CRYPTO_free(a->sigalg_list[j].hash_name, "ssl/ssl_lib.c", 4197);
34742 CRYPTO_free(a->sigalg_list[j].hash_oid, "ssl/ssl_lib.c", 4198);
34743 CRYPTO_free(a->sigalg_list[j].keytype, "ssl/ssl_lib.c", 4199);
34744 CRYPTO_free(a->sigalg_list[j].keytype_oid, "ssl/ssl_lib.c", 4200);
34745 }
34746 CRYPTO_free(a->sigalg_list, "ssl/ssl_lib.c", 4202);
34747 CRYPTO_free(a->ssl_cert_info, "ssl/ssl_lib.c", 4203);
34748
34749 CRYPTO_free(a->sigalg_lookup_cache, "ssl/ssl_lib.c", 4205);
34750 CRYPTO_free(a->tls12_sigalgs, "ssl/ssl_lib.c", 4206);
34751
34752 CRYPTO_free(a->client_cert_type, "ssl/ssl_lib.c", 4208);
34753 CRYPTO_free(a->server_cert_type, "ssl/ssl_lib.c", 4209);
34754
34755 CRYPTO_THREAD_lock_free(a->lock);
34756 CRYPTO_FREE_REF(&a->references);
34757
34758
34759
34760
34761 CRYPTO_free(a->propq, "ssl/ssl_lib.c", 4217);
34762
34763 CRYPTO_free(a->qlog_title, "ssl/ssl_lib.c", 4219);
34764
34765
34766 CRYPTO_free(a, "ssl/ssl_lib.c", 4222);
34767 }
34768
34769 void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb)
34770 {
34771 ctx->default_passwd_callback = cb;
34772 }
34773
34774 void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u)
34775 {
34776 ctx->default_passwd_callback_userdata = u;
34777 }
34778
34779 pem_password_cb *SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx)
34780 {
34781 return ctx->default_passwd_callback;
34782 }
34783
34784 void *SSL_CTX_get_default_passwd_cb_userdata(SSL_CTX *ctx)
34785 {
34786 return ctx->default_passwd_callback_userdata;
34787 }
34788
34789 void SSL_set_default_passwd_cb(SSL *s, pem_password_cb *cb)
34790 {
34791 SSL_CONNECTION *sc = ((s) ==
34792 # 4247 "ssl/ssl_lib.c" 3 4
34793 ((void *)0)
34794 # 4247 "ssl/ssl_lib.c"
34795 ?
34796 # 4247 "ssl/ssl_lib.c" 3 4
34797 ((void *)0)
34798 # 4247 "ssl/ssl_lib.c"
34799 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
34800 # 4247 "ssl/ssl_lib.c" 3 4
34801 ((void *)0)
34802 # 4247 "ssl/ssl_lib.c"
34803 )));
34804
34805 if (sc ==
34806 # 4249 "ssl/ssl_lib.c" 3 4
34807 ((void *)0)
34808 # 4249 "ssl/ssl_lib.c"
34809 )
34810 return;
34811
34812 sc->default_passwd_callback = cb;
34813 }
34814
34815 void SSL_set_default_passwd_cb_userdata(SSL *s, void *u)
34816 {
34817 SSL_CONNECTION *sc = ((s) ==
34818 # 4257 "ssl/ssl_lib.c" 3 4
34819 ((void *)0)
34820 # 4257 "ssl/ssl_lib.c"
34821 ?
34822 # 4257 "ssl/ssl_lib.c" 3 4
34823 ((void *)0)
34824 # 4257 "ssl/ssl_lib.c"
34825 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
34826 # 4257 "ssl/ssl_lib.c" 3 4
34827 ((void *)0)
34828 # 4257 "ssl/ssl_lib.c"
34829 )));
34830
34831 if (sc ==
34832 # 4259 "ssl/ssl_lib.c" 3 4
34833 ((void *)0)
34834 # 4259 "ssl/ssl_lib.c"
34835 )
34836 return;
34837
34838 sc->default_passwd_callback_userdata = u;
34839 }
34840
34841 pem_password_cb *SSL_get_default_passwd_cb(SSL *s)
34842 {
34843 SSL_CONNECTION *sc = ((s) ==
34844 # 4267 "ssl/ssl_lib.c" 3 4
34845 ((void *)0)
34846 # 4267 "ssl/ssl_lib.c"
34847 ?
34848 # 4267 "ssl/ssl_lib.c" 3 4
34849 ((void *)0)
34850 # 4267 "ssl/ssl_lib.c"
34851 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
34852 # 4267 "ssl/ssl_lib.c" 3 4
34853 ((void *)0)
34854 # 4267 "ssl/ssl_lib.c"
34855 )));
34856
34857 if (sc ==
34858 # 4269 "ssl/ssl_lib.c" 3 4
34859 ((void *)0)
34860 # 4269 "ssl/ssl_lib.c"
34861 )
34862 return
34863 # 4270 "ssl/ssl_lib.c" 3 4
34864 ((void *)0)
34865 # 4270 "ssl/ssl_lib.c"
34866 ;
34867
34868 return sc->default_passwd_callback;
34869 }
34870
34871 void *SSL_get_default_passwd_cb_userdata(SSL *s)
34872 {
34873 SSL_CONNECTION *sc = ((s) ==
34874 # 4277 "ssl/ssl_lib.c" 3 4
34875 ((void *)0)
34876 # 4277 "ssl/ssl_lib.c"
34877 ?
34878 # 4277 "ssl/ssl_lib.c" 3 4
34879 ((void *)0)
34880 # 4277 "ssl/ssl_lib.c"
34881 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
34882 # 4277 "ssl/ssl_lib.c" 3 4
34883 ((void *)0)
34884 # 4277 "ssl/ssl_lib.c"
34885 )));
34886
34887 if (sc ==
34888 # 4279 "ssl/ssl_lib.c" 3 4
34889 ((void *)0)
34890 # 4279 "ssl/ssl_lib.c"
34891 )
34892 return
34893 # 4280 "ssl/ssl_lib.c" 3 4
34894 ((void *)0)
34895 # 4280 "ssl/ssl_lib.c"
34896 ;
34897
34898 return sc->default_passwd_callback_userdata;
34899 }
34900
34901 void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx,
34902 int (*cb) (X509_STORE_CTX *, void *),
34903 void *arg)
34904 {
34905 ctx->app_verify_callback = cb;
34906 ctx->app_verify_arg = arg;
34907 }
34908
34909 void SSL_CTX_set_verify(SSL_CTX *ctx, int mode,
34910 int (*cb) (int, X509_STORE_CTX *))
34911 {
34912 ctx->verify_mode = mode;
34913 ctx->default_verify_callback = cb;
34914 }
34915
34916 void SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth)
34917 {
34918 X509_VERIFY_PARAM_set_depth(ctx->param, depth);
34919 }
34920
34921 void SSL_CTX_set_cert_cb(SSL_CTX *c, int (*cb) (SSL *ssl, void *arg), void *arg)
34922 {
34923 ssl_cert_set_cert_cb(c->cert, cb, arg);
34924 }
34925
34926 void SSL_set_cert_cb(SSL *s, int (*cb) (SSL *ssl, void *arg), void *arg)
34927 {
34928 SSL_CONNECTION *sc = ((s) ==
34929 # 4312 "ssl/ssl_lib.c" 3 4
34930 ((void *)0)
34931 # 4312 "ssl/ssl_lib.c"
34932 ?
34933 # 4312 "ssl/ssl_lib.c" 3 4
34934 ((void *)0)
34935 # 4312 "ssl/ssl_lib.c"
34936 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
34937 # 4312 "ssl/ssl_lib.c" 3 4
34938 ((void *)0)
34939 # 4312 "ssl/ssl_lib.c"
34940 )));
34941
34942 if (sc ==
34943 # 4314 "ssl/ssl_lib.c" 3 4
34944 ((void *)0)
34945 # 4314 "ssl/ssl_lib.c"
34946 )
34947 return;
34948
34949 ssl_cert_set_cert_cb(sc->cert, cb, arg);
34950 }
34951
34952 void ssl_set_masks(SSL_CONNECTION *s)
34953 {
34954 CERT *c = s->cert;
34955 uint32_t *pvalid = s->s3.tmp.valid_flags;
34956 int rsa_enc, rsa_sign, dh_tmp, dsa_sign;
34957 unsigned long mask_k, mask_a;
34958 int have_ecc_cert, ecdsa_ok;
34959
34960 if (c ==
34961 # 4328 "ssl/ssl_lib.c" 3 4
34962 ((void *)0)
34963 # 4328 "ssl/ssl_lib.c"
34964 )
34965 return;
34966
34967 dh_tmp = (c->dh_tmp !=
34968 # 4331 "ssl/ssl_lib.c" 3 4
34969 ((void *)0)
34970
34971 # 4332 "ssl/ssl_lib.c"
34972 || c->dh_tmp_cb !=
34973 # 4332 "ssl/ssl_lib.c" 3 4
34974 ((void *)0)
34975
34976 # 4333 "ssl/ssl_lib.c"
34977 || c->dh_tmp_auto);
34978
34979 rsa_enc = pvalid[0] & 0x1;
34980 rsa_sign = pvalid[0] & 0x1;
34981 dsa_sign = pvalid[2] & 0x1;
34982 have_ecc_cert = pvalid[3] & 0x1;
34983 mask_k = 0;
34984 mask_a = 0;
34985
34986 ((void)0)
34987 ;
34988
34989
34990 if (ssl_has_cert(s, 6)) {
34991 mask_k |= 0x00000010U | 0x00000200U;
34992 mask_a |= 0x00000080U;
34993 }
34994 if (ssl_has_cert(s, 5)) {
34995 mask_k |= 0x00000010U | 0x00000200U;
34996 mask_a |= 0x00000080U;
34997 }
34998 if (ssl_has_cert(s, 4)) {
34999 mask_k |= 0x00000010U;
35000 mask_a |= 0x00000020U;
35001 }
35002
35003
35004 if (rsa_enc)
35005 mask_k |= 0x00000001U;
35006
35007 if (dh_tmp)
35008 mask_k |= 0x00000002U;
35009
35010
35011
35012
35013
35014
35015 if (rsa_enc || rsa_sign || (ssl_has_cert(s, 1)
35016 && pvalid[1] & 0x100
35017 && ((SSL_version(&s->ssl) >> 8) == 0x03 ? SSL_version(&s->ssl) : 0) == 0x0303))
35018 mask_a |= 0x00000001U;
35019
35020 if (dsa_sign) {
35021 mask_a |= 0x00000002U;
35022 }
35023
35024 mask_a |= 0x00000004U;
35025
35026
35027
35028
35029
35030 if (pvalid[0] & 0x1000) {
35031 mask_a |= 0x00000001U;
35032 mask_k |= 0x00000001U;
35033 }
35034 if (pvalid[3] & 0x1000)
35035 mask_a |= 0x00000008U;
35036 if (((SSL_version(&s->ssl) >> 8) == 0x03 ? SSL_version(&s->ssl) : 0) == 0x0303) {
35037 if (pvalid[1] & 0x1000)
35038 mask_a |= 0x00000001U;
35039 if (pvalid[7] & 0x1000
35040 || pvalid[8] & 0x1000)
35041 mask_a |= 0x00000008U;
35042 }
35043
35044
35045
35046
35047
35048 if (have_ecc_cert) {
35049 uint32_t ex_kusage;
35050 ex_kusage = X509_get_key_usage(c->pkeys[3].x509);
35051 ecdsa_ok = ex_kusage & 0x0080;
35052 if (!(pvalid[3] & 0x2))
35053 ecdsa_ok = 0;
35054 if (ecdsa_ok)
35055 mask_a |= 0x00000008U;
35056 }
35057
35058 if (!(mask_a & 0x00000008U) && ssl_has_cert(s, 7)
35059 && pvalid[7] & 0x100
35060 && ((SSL_version(&s->ssl) >> 8) == 0x03 ? SSL_version(&s->ssl) : 0) == 0x0303)
35061 mask_a |= 0x00000008U;
35062
35063
35064 if (!(mask_a & 0x00000008U) && ssl_has_cert(s, 8)
35065 && pvalid[8] & 0x100
35066 && ((SSL_version(&s->ssl) >> 8) == 0x03 ? SSL_version(&s->ssl) : 0) == 0x0303)
35067 mask_a |= 0x00000008U;
35068
35069 mask_k |= 0x00000004U;
35070
35071
35072 mask_k |= 0x00000008U;
35073 mask_a |= 0x00000010U;
35074 if (mask_k & 0x00000001U)
35075 mask_k |= 0x00000040U;
35076 if (mask_k & 0x00000002U)
35077 mask_k |= 0x00000100U;
35078 if (mask_k & 0x00000004U)
35079 mask_k |= 0x00000080U;
35080
35081
35082 s->s3.tmp.mask_k = mask_k;
35083 s->s3.tmp.mask_a = mask_a;
35084 }
35085
35086 int ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL_CONNECTION *s)
35087 {
35088 if (s->s3.tmp.new_cipher->algorithm_auth & 0x00000008U) {
35089
35090 if (!(X509_get_key_usage(x) & 0x0080)) {
35091 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",4447,__func__), ERR_set_error)((20),(318),
35092 # 4447 "ssl/ssl_lib.c" 3 4
35093 ((void *)0)
35094 # 4447 "ssl/ssl_lib.c"
35095 );
35096 return 0;
35097 }
35098 }
35099 return 1;
35100 }
35101
35102 int ssl_get_server_cert_serverinfo(SSL_CONNECTION *s,
35103 const unsigned char **serverinfo,
35104 size_t *serverinfo_length)
35105 {
35106 CERT_PKEY *cpk = s->s3.tmp.cert;
35107 *serverinfo_length = 0;
35108
35109 if (cpk ==
35110 # 4461 "ssl/ssl_lib.c" 3 4
35111 ((void *)0)
35112 # 4461 "ssl/ssl_lib.c"
35113 || cpk->serverinfo ==
35114 # 4461 "ssl/ssl_lib.c" 3 4
35115 ((void *)0)
35116 # 4461 "ssl/ssl_lib.c"
35117 )
35118 return 0;
35119
35120 *serverinfo = cpk->serverinfo;
35121 *serverinfo_length = cpk->serverinfo_length;
35122 return 1;
35123 }
35124
35125 void ssl_update_cache(SSL_CONNECTION *s, int mode)
35126 {
35127 int i;
35128
35129
35130
35131
35132
35133 if (s->session->session_id_length == 0)
35134 return;
35135 # 4489 "ssl/ssl_lib.c"
35136 if (s->server && s->session->sid_ctx_length == 0
35137 && (s->verify_mode & 0x01) != 0)
35138 return;
35139
35140 i = s->session_ctx->session_cache_mode;
35141 if ((i & mode) != 0
35142 && (!s->hit || (!((&(s)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(s)->ssl)->method->version >= 0x0304 && (&(s)->ssl)->method->version != 0x10000))) {
35143 # 4507 "ssl/ssl_lib.c"
35144 if ((i & 0x0200) == 0
35145 && (!(!((&(s)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(s)->ssl)->method->version >= 0x0304 && (&(s)->ssl)->method->version != 0x10000)
35146 || !s->server
35147 || (s->max_early_data > 0
35148 && (s->options & ((uint64_t)1 << (uint64_t)24)) == 0)
35149 || s->session_ctx->remove_session_cb !=
35150 # 4512 "ssl/ssl_lib.c" 3 4
35151 ((void *)0)
35152
35153 # 4513 "ssl/ssl_lib.c"
35154 || (s->options & ((uint64_t)1 << (uint64_t)14)) != 0))
35155 SSL_CTX_add_session(s->session_ctx, s->session);
35156
35157
35158
35159
35160
35161
35162 if (s->session_ctx->new_session_cb !=
35163 # 4521 "ssl/ssl_lib.c" 3 4
35164 ((void *)0)
35165 # 4521 "ssl/ssl_lib.c"
35166 ) {
35167 SSL_SESSION_up_ref(s->session);
35168 if (!s->session_ctx->new_session_cb((&(s)->ssl),
35169 s->session))
35170 SSL_SESSION_free(s->session);
35171 }
35172 }
35173
35174
35175 if ((!(i & 0x0080)) && ((i & mode) == mode)) {
35176 _Atomic int *stat;
35177
35178 if (mode & 0x0001)
35179 stat = &s->session_ctx->stats.sess_connect_good;
35180 else
35181 stat = &s->session_ctx->stats.sess_accept_good;
35182 if ((ssl_tsan_load(s->session_ctx, stat) & 0xff) == 0xff)
35183 SSL_CTX_flush_sessions(s->session_ctx, (unsigned long)time(
35184 # 4538 "ssl/ssl_lib.c" 3 4
35185 ((void *)0)
35186 # 4538 "ssl/ssl_lib.c"
35187 ));
35188 }
35189 }
35190
35191 const SSL_METHOD *SSL_CTX_get_ssl_method(const SSL_CTX *ctx)
35192 {
35193 return ctx->method;
35194 }
35195
35196 const SSL_METHOD *SSL_get_ssl_method(const SSL *s)
35197 {
35198 return s->method;
35199 }
35200
35201 int SSL_set_ssl_method(SSL *s, const SSL_METHOD *meth)
35202 {
35203 int ret = 1;
35204 SSL_CONNECTION *sc = ((s) ==
35205 # 4555 "ssl/ssl_lib.c" 3 4
35206 ((void *)0)
35207 # 4555 "ssl/ssl_lib.c"
35208 ?
35209 # 4555 "ssl/ssl_lib.c" 3 4
35210 ((void *)0)
35211 # 4555 "ssl/ssl_lib.c"
35212 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
35213 # 4555 "ssl/ssl_lib.c" 3 4
35214 ((void *)0)
35215 # 4555 "ssl/ssl_lib.c"
35216 )));
35217
35218
35219 if (sc ==
35220 # 4558 "ssl/ssl_lib.c" 3 4
35221 ((void *)0)
35222
35223 # 4559 "ssl/ssl_lib.c"
35224 || (s->type != 0 && s->method != meth)
35225 || (s->type == 0 && ((meth) == OSSL_QUIC_client_method() || (meth) == OSSL_QUIC_client_thread_method())))
35226 return 0;
35227
35228 if (s->method != meth) {
35229 const SSL_METHOD *sm = s->method;
35230 int (*hf) (SSL *) = sc->handshake_func;
35231
35232 if (sm->version == meth->version)
35233 s->method = meth;
35234 else {
35235 sm->ssl_deinit(s);
35236 s->method = meth;
35237 ret = s->method->ssl_init(s);
35238 }
35239
35240 if (hf == sm->ssl_connect)
35241 sc->handshake_func = meth->ssl_connect;
35242 else if (hf == sm->ssl_accept)
35243 sc->handshake_func = meth->ssl_accept;
35244 }
35245 return ret;
35246 }
35247
35248 int SSL_get_error(const SSL *s, int i)
35249 {
35250 return ossl_ssl_get_error(s, i, 1);
35251 }
35252
35253 int ossl_ssl_get_error(const SSL *s, int i, int check_err)
35254 {
35255 int reason;
35256 unsigned long l;
35257 BIO *bio;
35258 const SSL_CONNECTION *sc = ((s) ==
35259 # 4593 "ssl/ssl_lib.c" 3 4
35260 ((void *)0)
35261 # 4593 "ssl/ssl_lib.c"
35262 ?
35263 # 4593 "ssl/ssl_lib.c" 3 4
35264 ((void *)0)
35265 # 4593 "ssl/ssl_lib.c"
35266 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
35267 # 4593 "ssl/ssl_lib.c" 3 4
35268 ((void *)0)
35269 # 4593 "ssl/ssl_lib.c"
35270 )));
35271
35272 if (i > 0)
35273 return 0;
35274
35275
35276 if (((s) !=
35277 # 4599 "ssl/ssl_lib.c" 3 4
35278 ((void *)0)
35279 # 4599 "ssl/ssl_lib.c"
35280 && ((s)->type == 1 || (s)->type == 2))) {
35281 reason = ossl_quic_get_error(s, i);
35282 if (reason != 0)
35283 return reason;
35284 }
35285
35286
35287 if (sc ==
35288 # 4606 "ssl/ssl_lib.c" 3 4
35289 ((void *)0)
35290 # 4606 "ssl/ssl_lib.c"
35291 )
35292 return 1;
35293
35294
35295
35296
35297
35298 if (check_err && (l = ERR_peek_error()) != 0) {
35299 if (ERR_GET_LIB(l) == 2)
35300 return 5;
35301 else
35302 return 1;
35303 }
35304
35305
35306 if (!((s) !=
35307 # 4621 "ssl/ssl_lib.c" 3 4
35308 ((void *)0)
35309 # 4621 "ssl/ssl_lib.c"
35310 && ((s)->type == 1 || (s)->type == 2)))
35311
35312 {
35313 if ((SSL_want(s) == 3)) {
35314 bio = SSL_get_rbio(s);
35315 if (BIO_test_flags(bio, 0x01))
35316 return 2;
35317 else if (BIO_test_flags(bio, 0x02))
35318 # 4638 "ssl/ssl_lib.c"
35319 return 3;
35320 else if (BIO_test_flags(bio, 0x04)) {
35321 reason = BIO_get_retry_reason(bio);
35322 if (reason == 0x02)
35323 return 7;
35324 else if (reason == 0x03)
35325 return 8;
35326 else
35327 return 5;
35328 }
35329 }
35330
35331 if ((SSL_want(s) == 2)) {
35332
35333
35334
35335
35336 bio = sc->wbio;
35337 if (BIO_test_flags(bio, 0x02))
35338 return 3;
35339 else if (BIO_test_flags(bio, 0x01))
35340
35341
35342
35343 return 2;
35344 else if (BIO_test_flags(bio, 0x04)) {
35345 reason = BIO_get_retry_reason(bio);
35346 if (reason == 0x02)
35347 return 7;
35348 else if (reason == 0x03)
35349 return 8;
35350 else
35351 return 5;
35352 }
35353 }
35354 }
35355
35356 if ((SSL_want(s) == 4))
35357 return 4;
35358 if ((SSL_want(s) == 8))
35359 return 12;
35360 if ((SSL_want(s) == 5))
35361 return 9;
35362 if ((SSL_want(s) == 6))
35363 return 10;
35364 if ((SSL_want(s) == 7))
35365 return 11;
35366
35367 if ((sc->shutdown & 2) &&
35368 (sc->s3.warn_alert == 0))
35369 return 6;
35370
35371 return 5;
35372 }
35373
35374 static int ssl_do_handshake_intern(void *vargs)
35375 {
35376 struct ssl_async_args *args = (struct ssl_async_args *)vargs;
35377 SSL *s = args->s;
35378 SSL_CONNECTION *sc = ((s) ==
35379 # 4697 "ssl/ssl_lib.c" 3 4
35380 ((void *)0)
35381 # 4697 "ssl/ssl_lib.c"
35382 ?
35383 # 4697 "ssl/ssl_lib.c" 3 4
35384 ((void *)0)
35385 # 4697 "ssl/ssl_lib.c"
35386 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
35387 # 4697 "ssl/ssl_lib.c" 3 4
35388 ((void *)0)
35389 # 4697 "ssl/ssl_lib.c"
35390 )));
35391
35392 if (sc ==
35393 # 4699 "ssl/ssl_lib.c" 3 4
35394 ((void *)0)
35395 # 4699 "ssl/ssl_lib.c"
35396 )
35397 return -1;
35398
35399 return sc->handshake_func(s);
35400 }
35401
35402 int SSL_do_handshake(SSL *s)
35403 {
35404 int ret = 1;
35405 SSL_CONNECTION *sc = ((s) ==
35406 # 4708 "ssl/ssl_lib.c" 3 4
35407 ((void *)0)
35408 # 4708 "ssl/ssl_lib.c"
35409 ?
35410 # 4708 "ssl/ssl_lib.c" 3 4
35411 ((void *)0)
35412 # 4708 "ssl/ssl_lib.c"
35413 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
35414 # 4708 "ssl/ssl_lib.c" 3 4
35415 ((void *)0)
35416 # 4708 "ssl/ssl_lib.c"
35417 )));
35418
35419
35420 if (((s) !=
35421 # 4711 "ssl/ssl_lib.c" 3 4
35422 ((void *)0)
35423 # 4711 "ssl/ssl_lib.c"
35424 && ((s)->type == 1 || (s)->type == 2)))
35425 return ossl_quic_do_handshake(s);
35426
35427
35428 if (sc->handshake_func ==
35429 # 4715 "ssl/ssl_lib.c" 3 4
35430 ((void *)0)
35431 # 4715 "ssl/ssl_lib.c"
35432 ) {
35433 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",4716,__func__), ERR_set_error)((20),(144),
35434 # 4716 "ssl/ssl_lib.c" 3 4
35435 ((void *)0)
35436 # 4716 "ssl/ssl_lib.c"
35437 );
35438 return -1;
35439 }
35440
35441 ossl_statem_check_finish_init(sc, -1);
35442
35443 s->method->ssl_renegotiate_check(s, 0);
35444
35445 if (SSL_in_init(s) || SSL_in_before(s)) {
35446 if ((sc->mode & 0x00000100U) && ASYNC_get_current_job() ==
35447 # 4725 "ssl/ssl_lib.c" 3 4
35448 ((void *)0)
35449 # 4725 "ssl/ssl_lib.c"
35450 ) {
35451 struct ssl_async_args args;
35452
35453 memset(&args, 0, sizeof(args));
35454 args.s = s;
35455
35456 ret = ssl_start_async_job(s, &args, ssl_do_handshake_intern);
35457 } else {
35458 ret = sc->handshake_func(s);
35459 }
35460 }
35461 return ret;
35462 }
35463
35464 void SSL_set_accept_state(SSL *s)
35465 {
35466 SSL_CONNECTION *sc = ((s) ==
35467 # 4741 "ssl/ssl_lib.c" 3 4
35468 ((void *)0)
35469 # 4741 "ssl/ssl_lib.c"
35470 ?
35471 # 4741 "ssl/ssl_lib.c" 3 4
35472 ((void *)0)
35473 # 4741 "ssl/ssl_lib.c"
35474 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
35475 # 4741 "ssl/ssl_lib.c" 3 4
35476 ((void *)0)
35477 # 4741 "ssl/ssl_lib.c"
35478 ));
35479
35480
35481 if (((s) !=
35482 # 4744 "ssl/ssl_lib.c" 3 4
35483 ((void *)0)
35484 # 4744 "ssl/ssl_lib.c"
35485 && ((s)->type == 1 || (s)->type == 2))) {
35486 ossl_quic_set_accept_state(s);
35487 return;
35488 }
35489
35490
35491 sc->server = 1;
35492 sc->shutdown = 0;
35493 ossl_statem_clear(sc);
35494 sc->handshake_func = s->method->ssl_accept;
35495
35496 RECORD_LAYER_reset(&sc->rlayer);
35497 }
35498
35499 void SSL_set_connect_state(SSL *s)
35500 {
35501 SSL_CONNECTION *sc = ((s) ==
35502 # 4760 "ssl/ssl_lib.c" 3 4
35503 ((void *)0)
35504 # 4760 "ssl/ssl_lib.c"
35505 ?
35506 # 4760 "ssl/ssl_lib.c" 3 4
35507 ((void *)0)
35508 # 4760 "ssl/ssl_lib.c"
35509 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
35510 # 4760 "ssl/ssl_lib.c" 3 4
35511 ((void *)0)
35512 # 4760 "ssl/ssl_lib.c"
35513 ));
35514
35515
35516 if (((s) !=
35517 # 4763 "ssl/ssl_lib.c" 3 4
35518 ((void *)0)
35519 # 4763 "ssl/ssl_lib.c"
35520 && ((s)->type == 1 || (s)->type == 2))) {
35521 ossl_quic_set_connect_state(s);
35522 return;
35523 }
35524
35525
35526 sc->server = 0;
35527 sc->shutdown = 0;
35528 ossl_statem_clear(sc);
35529 sc->handshake_func = s->method->ssl_connect;
35530
35531 RECORD_LAYER_reset(&sc->rlayer);
35532 }
35533
35534 int ssl_undefined_function(SSL *s)
35535 {
35536 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",4779,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
35537 # 4779 "ssl/ssl_lib.c" 3 4
35538 ((void *)0)
35539 # 4779 "ssl/ssl_lib.c"
35540 );
35541 return 0;
35542 }
35543
35544 int ssl_undefined_void_function(void)
35545 {
35546 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",4785,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
35547 # 4785 "ssl/ssl_lib.c" 3 4
35548 ((void *)0)
35549 # 4785 "ssl/ssl_lib.c"
35550 );
35551 return 0;
35552 }
35553
35554 int ssl_undefined_const_function(const SSL *s)
35555 {
35556 return 0;
35557 }
35558
35559 const char *ssl_protocol_to_string(int version)
35560 {
35561 switch (version)
35562 {
35563 case 0x0304:
35564 return "TLSv1.3";
35565
35566 case 0x0303:
35567 return "TLSv1.2";
35568
35569 case 0x0302:
35570 return "TLSv1.1";
35571
35572 case 0x0301:
35573 return "TLSv1";
35574
35575 case 0x0300:
35576 return "SSLv3";
35577
35578 case 0x0100:
35579 return "DTLSv0.9";
35580
35581 case 0xFEFF:
35582 return "DTLSv1";
35583
35584 case 0xFEFD:
35585 return "DTLSv1.2";
35586
35587 default:
35588 return "unknown";
35589 }
35590 }
35591
35592 const char *SSL_get_version(const SSL *s)
35593 {
35594 const SSL_CONNECTION *sc = ((s) ==
35595 # 4829 "ssl/ssl_lib.c" 3 4
35596 ((void *)0)
35597 # 4829 "ssl/ssl_lib.c"
35598 ?
35599 # 4829 "ssl/ssl_lib.c" 3 4
35600 ((void *)0)
35601 # 4829 "ssl/ssl_lib.c"
35602 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
35603 # 4829 "ssl/ssl_lib.c" 3 4
35604 ((void *)0)
35605 # 4829 "ssl/ssl_lib.c"
35606 )));
35607
35608
35609
35610 if (s->type == 1 || s->type == 2)
35611 return "QUICv1";
35612
35613
35614 if (sc ==
35615 # 4837 "ssl/ssl_lib.c" 3 4
35616 ((void *)0)
35617 # 4837 "ssl/ssl_lib.c"
35618 )
35619 return
35620 # 4838 "ssl/ssl_lib.c" 3 4
35621 ((void *)0)
35622 # 4838 "ssl/ssl_lib.c"
35623 ;
35624
35625 return ssl_protocol_to_string(sc->version);
35626 }
35627
35628 int SSL_get_handshake_rtt(const SSL *s, uint64_t *rtt)
35629 {
35630 const SSL_CONNECTION *sc = ((s) ==
35631 # 4845 "ssl/ssl_lib.c" 3 4
35632 ((void *)0)
35633 # 4845 "ssl/ssl_lib.c"
35634 ?
35635 # 4845 "ssl/ssl_lib.c" 3 4
35636 ((void *)0)
35637 # 4845 "ssl/ssl_lib.c"
35638 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
35639 # 4845 "ssl/ssl_lib.c" 3 4
35640 ((void *)0)
35641 # 4845 "ssl/ssl_lib.c"
35642 )));
35643
35644 if (sc ==
35645 # 4847 "ssl/ssl_lib.c" 3 4
35646 ((void *)0)
35647 # 4847 "ssl/ssl_lib.c"
35648 )
35649 return -1;
35650 if (sc->ts_msg_write.t <= 0 || sc->ts_msg_read.t <= 0)
35651 return 0;
35652 if (sc->ts_msg_read.t < sc->ts_msg_write.t)
35653 return -1;
35654
35655 *rtt = (ossl_time2ticks(ossl_time_subtract(sc->ts_msg_read, sc->ts_msg_write)) / ((((uint64_t)1000000000) / 1000) / 1000));
35656 return 1;
35657 }
35658
35659 static int dup_ca_names(struct stack_st_X509_NAME **dst, struct stack_st_X509_NAME *src)
35660 {
35661 struct stack_st_X509_NAME *sk;
35662 X509_NAME *xn;
35663 int i;
35664
35665 if (src ==
35666 # 4864 "ssl/ssl_lib.c" 3 4
35667 ((void *)0)
35668 # 4864 "ssl/ssl_lib.c"
35669 ) {
35670 *dst =
35671 # 4865 "ssl/ssl_lib.c" 3 4
35672 ((void *)0)
35673 # 4865 "ssl/ssl_lib.c"
35674 ;
35675 return 1;
35676 }
35677
35678 if ((sk = ((struct stack_st_X509_NAME *)OPENSSL_sk_new_null())) ==
35679 # 4869 "ssl/ssl_lib.c" 3 4
35680 ((void *)0)
35681 # 4869 "ssl/ssl_lib.c"
35682 )
35683 return 0;
35684 for (i = 0; i < OPENSSL_sk_num(ossl_check_const_X509_NAME_sk_type(src)); i++) {
35685 xn = X509_NAME_dup(((X509_NAME *)OPENSSL_sk_value(ossl_check_const_X509_NAME_sk_type(src), (i))));
35686 if (xn ==
35687 # 4873 "ssl/ssl_lib.c" 3 4
35688 ((void *)0)
35689 # 4873 "ssl/ssl_lib.c"
35690 ) {
35691 OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk),ossl_check_X509_NAME_freefunc_type(X509_NAME_free));
35692 return 0;
35693 }
35694 if (OPENSSL_sk_insert(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_type(xn), (i)) == 0) {
35695 X509_NAME_free(xn);
35696 OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk),ossl_check_X509_NAME_freefunc_type(X509_NAME_free));
35697 return 0;
35698 }
35699 }
35700 *dst = sk;
35701
35702 return 1;
35703 }
35704
35705 SSL *SSL_dup(SSL *s)
35706 {
35707 SSL *ret;
35708 int i;
35709
35710 SSL_CONNECTION *retsc;
35711 SSL_CONNECTION *sc = ((s) ==
35712 # 4894 "ssl/ssl_lib.c" 3 4
35713 ((void *)0)
35714 # 4894 "ssl/ssl_lib.c"
35715 ?
35716 # 4894 "ssl/ssl_lib.c" 3 4
35717 ((void *)0)
35718 # 4894 "ssl/ssl_lib.c"
35719 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
35720 # 4894 "ssl/ssl_lib.c" 3 4
35721 ((void *)0)
35722 # 4894 "ssl/ssl_lib.c"
35723 ));
35724
35725 if (sc ==
35726 # 4896 "ssl/ssl_lib.c" 3 4
35727 ((void *)0)
35728 # 4896 "ssl/ssl_lib.c"
35729 )
35730 return
35731 # 4897 "ssl/ssl_lib.c" 3 4
35732 ((void *)0)
35733 # 4897 "ssl/ssl_lib.c"
35734 ;
35735
35736
35737 if (!SSL_in_init(s) || !SSL_in_before(s)) {
35738 CRYPTO_UP_REF(&s->references, &i);
35739 return s;
35740 }
35741
35742
35743
35744
35745 if ((ret = SSL_new(SSL_get_SSL_CTX(s))) ==
35746 # 4908 "ssl/ssl_lib.c" 3 4
35747 ((void *)0)
35748 # 4908 "ssl/ssl_lib.c"
35749 )
35750 return
35751 # 4909 "ssl/ssl_lib.c" 3 4
35752 ((void *)0)
35753 # 4909 "ssl/ssl_lib.c"
35754 ;
35755 if ((retsc = ((ret) ==
35756 # 4910 "ssl/ssl_lib.c" 3 4
35757 ((void *)0)
35758 # 4910 "ssl/ssl_lib.c"
35759 ?
35760 # 4910 "ssl/ssl_lib.c" 3 4
35761 ((void *)0)
35762 # 4910 "ssl/ssl_lib.c"
35763 : ((ret)->type == 0 ? ( SSL_CONNECTION *)(ret) :
35764 # 4910 "ssl/ssl_lib.c" 3 4
35765 ((void *)0)
35766 # 4910 "ssl/ssl_lib.c"
35767 ))) ==
35768 # 4910 "ssl/ssl_lib.c" 3 4
35769 ((void *)0)
35770 # 4910 "ssl/ssl_lib.c"
35771 )
35772 goto err;
35773
35774 if (sc->session !=
35775 # 4913 "ssl/ssl_lib.c" 3 4
35776 ((void *)0)
35777 # 4913 "ssl/ssl_lib.c"
35778 ) {
35779
35780
35781
35782
35783 if (!SSL_copy_session_id(ret, s))
35784 goto err;
35785 } else {
35786
35787
35788
35789
35790
35791
35792 if (!SSL_set_ssl_method(ret, s->method))
35793 goto err;
35794
35795 if (sc->cert !=
35796 # 4930 "ssl/ssl_lib.c" 3 4
35797 ((void *)0)
35798 # 4930 "ssl/ssl_lib.c"
35799 ) {
35800 ssl_cert_free(retsc->cert);
35801 retsc->cert = ssl_cert_dup(sc->cert);
35802 if (retsc->cert ==
35803 # 4933 "ssl/ssl_lib.c" 3 4
35804 ((void *)0)
35805 # 4933 "ssl/ssl_lib.c"
35806 )
35807 goto err;
35808 }
35809
35810 if (!SSL_set_session_id_context(ret, sc->sid_ctx,
35811 (int)sc->sid_ctx_length))
35812 goto err;
35813 }
35814
35815 if (!ssl_dane_dup(retsc, sc))
35816 goto err;
35817 retsc->version = sc->version;
35818 retsc->options = sc->options;
35819 retsc->min_proto_version = sc->min_proto_version;
35820 retsc->max_proto_version = sc->max_proto_version;
35821 retsc->mode = sc->mode;
35822 SSL_ctrl(ret,51,SSL_ctrl(s,50,0,
35823 # 4949 "ssl/ssl_lib.c" 3 4
35824 ((void *)0)
35825 # 4949 "ssl/ssl_lib.c"
35826 ),
35827 # 4949 "ssl/ssl_lib.c" 3 4
35828 ((void *)0)
35829 # 4949 "ssl/ssl_lib.c"
35830 );
35831 SSL_set_read_ahead(ret, SSL_get_read_ahead(s));
35832 retsc->msg_callback = sc->msg_callback;
35833 retsc->msg_callback_arg = sc->msg_callback_arg;
35834 SSL_set_verify(ret, SSL_get_verify_mode(s), SSL_get_verify_callback(s));
35835 SSL_set_verify_depth(ret, SSL_get_verify_depth(s));
35836 retsc->generate_session_id = sc->generate_session_id;
35837
35838 SSL_set_info_callback(ret, SSL_get_info_callback(s));
35839
35840
35841 if (!CRYPTO_dup_ex_data(0, &ret->ex_data, &s->ex_data))
35842 goto err;
35843
35844 retsc->server = sc->server;
35845 if (sc->handshake_func) {
35846 if (sc->server)
35847 SSL_set_accept_state(ret);
35848 else
35849 SSL_set_connect_state(ret);
35850 }
35851 retsc->shutdown = sc->shutdown;
35852 retsc->hit = sc->hit;
35853
35854 retsc->default_passwd_callback = sc->default_passwd_callback;
35855 retsc->default_passwd_callback_userdata = sc->default_passwd_callback_userdata;
35856
35857 X509_VERIFY_PARAM_inherit(retsc->param, sc->param);
35858
35859
35860 if (sc->cipher_list !=
35861 # 4979 "ssl/ssl_lib.c" 3 4
35862 ((void *)0)
35863 # 4979 "ssl/ssl_lib.c"
35864 ) {
35865 if ((retsc->cipher_list = ((struct stack_st_SSL_CIPHER *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sc->cipher_list)))) ==
35866 # 4980 "ssl/ssl_lib.c" 3 4
35867 ((void *)0)
35868 # 4980 "ssl/ssl_lib.c"
35869 )
35870 goto err;
35871 }
35872 if (sc->cipher_list_by_id !=
35873 # 4983 "ssl/ssl_lib.c" 3 4
35874 ((void *)0)
35875 # 4983 "ssl/ssl_lib.c"
35876 )
35877 if ((retsc->cipher_list_by_id = ((struct stack_st_SSL_CIPHER *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sc->cipher_list_by_id))))
35878 ==
35879 # 4985 "ssl/ssl_lib.c" 3 4
35880 ((void *)0)
35881 # 4985 "ssl/ssl_lib.c"
35882 )
35883 goto err;
35884
35885
35886 if (!dup_ca_names(&retsc->ca_names, sc->ca_names)
35887 || !dup_ca_names(&retsc->client_ca_names, sc->client_ca_names))
35888 goto err;
35889
35890 return ret;
35891
35892 err:
35893 SSL_free(ret);
35894 return
35895 # 4997 "ssl/ssl_lib.c" 3 4
35896 ((void *)0)
35897 # 4997 "ssl/ssl_lib.c"
35898 ;
35899 }
35900
35901 X509 *SSL_get_certificate(const SSL *s)
35902 {
35903 SSL_CONNECTION *sc = ((s) ==
35904 # 5002 "ssl/ssl_lib.c" 3 4
35905 ((void *)0)
35906 # 5002 "ssl/ssl_lib.c"
35907 ?
35908 # 5002 "ssl/ssl_lib.c" 3 4
35909 ((void *)0)
35910 # 5002 "ssl/ssl_lib.c"
35911 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
35912 # 5002 "ssl/ssl_lib.c" 3 4
35913 ((void *)0)
35914 # 5002 "ssl/ssl_lib.c"
35915 )));
35916
35917 if (sc ==
35918 # 5004 "ssl/ssl_lib.c" 3 4
35919 ((void *)0)
35920 # 5004 "ssl/ssl_lib.c"
35921 )
35922 return
35923 # 5005 "ssl/ssl_lib.c" 3 4
35924 ((void *)0)
35925 # 5005 "ssl/ssl_lib.c"
35926 ;
35927
35928 if (sc->cert !=
35929 # 5007 "ssl/ssl_lib.c" 3 4
35930 ((void *)0)
35931 # 5007 "ssl/ssl_lib.c"
35932 )
35933 return sc->cert->key->x509;
35934 else
35935 return
35936 # 5010 "ssl/ssl_lib.c" 3 4
35937 ((void *)0)
35938 # 5010 "ssl/ssl_lib.c"
35939 ;
35940 }
35941
35942 EVP_PKEY *SSL_get_privatekey(const SSL *s)
35943 {
35944 const SSL_CONNECTION *sc = ((s) ==
35945 # 5015 "ssl/ssl_lib.c" 3 4
35946 ((void *)0)
35947 # 5015 "ssl/ssl_lib.c"
35948 ?
35949 # 5015 "ssl/ssl_lib.c" 3 4
35950 ((void *)0)
35951 # 5015 "ssl/ssl_lib.c"
35952 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
35953 # 5015 "ssl/ssl_lib.c" 3 4
35954 ((void *)0)
35955 # 5015 "ssl/ssl_lib.c"
35956 )));
35957
35958 if (sc ==
35959 # 5017 "ssl/ssl_lib.c" 3 4
35960 ((void *)0)
35961 # 5017 "ssl/ssl_lib.c"
35962 )
35963 return
35964 # 5018 "ssl/ssl_lib.c" 3 4
35965 ((void *)0)
35966 # 5018 "ssl/ssl_lib.c"
35967 ;
35968
35969 if (sc->cert !=
35970 # 5020 "ssl/ssl_lib.c" 3 4
35971 ((void *)0)
35972 # 5020 "ssl/ssl_lib.c"
35973 )
35974 return sc->cert->key->privatekey;
35975 else
35976 return
35977 # 5023 "ssl/ssl_lib.c" 3 4
35978 ((void *)0)
35979 # 5023 "ssl/ssl_lib.c"
35980 ;
35981 }
35982
35983 X509 *SSL_CTX_get0_certificate(const SSL_CTX *ctx)
35984 {
35985 if (ctx->cert !=
35986 # 5028 "ssl/ssl_lib.c" 3 4
35987 ((void *)0)
35988 # 5028 "ssl/ssl_lib.c"
35989 )
35990 return ctx->cert->key->x509;
35991 else
35992 return
35993 # 5031 "ssl/ssl_lib.c" 3 4
35994 ((void *)0)
35995 # 5031 "ssl/ssl_lib.c"
35996 ;
35997 }
35998
35999 EVP_PKEY *SSL_CTX_get0_privatekey(const SSL_CTX *ctx)
36000 {
36001 if (ctx->cert !=
36002 # 5036 "ssl/ssl_lib.c" 3 4
36003 ((void *)0)
36004 # 5036 "ssl/ssl_lib.c"
36005 )
36006 return ctx->cert->key->privatekey;
36007 else
36008 return
36009 # 5039 "ssl/ssl_lib.c" 3 4
36010 ((void *)0)
36011 # 5039 "ssl/ssl_lib.c"
36012 ;
36013 }
36014
36015 const SSL_CIPHER *SSL_get_current_cipher(const SSL *s)
36016 {
36017 const SSL_CONNECTION *sc = ((s) ==
36018 # 5044 "ssl/ssl_lib.c" 3 4
36019 ((void *)0)
36020 # 5044 "ssl/ssl_lib.c"
36021 ?
36022 # 5044 "ssl/ssl_lib.c" 3 4
36023 ((void *)0)
36024 # 5044 "ssl/ssl_lib.c"
36025 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
36026 # 5044 "ssl/ssl_lib.c" 3 4
36027 ((void *)0)
36028 # 5044 "ssl/ssl_lib.c"
36029 )));
36030
36031 if (sc ==
36032 # 5046 "ssl/ssl_lib.c" 3 4
36033 ((void *)0)
36034 # 5046 "ssl/ssl_lib.c"
36035 )
36036 return
36037 # 5047 "ssl/ssl_lib.c" 3 4
36038 ((void *)0)
36039 # 5047 "ssl/ssl_lib.c"
36040 ;
36041
36042 if ((sc->session !=
36043 # 5049 "ssl/ssl_lib.c" 3 4
36044 ((void *)0)
36045 # 5049 "ssl/ssl_lib.c"
36046 ) && (sc->session->cipher !=
36047 # 5049 "ssl/ssl_lib.c" 3 4
36048 ((void *)0)
36049 # 5049 "ssl/ssl_lib.c"
36050 ))
36051 return sc->session->cipher;
36052 return
36053 # 5051 "ssl/ssl_lib.c" 3 4
36054 ((void *)0)
36055 # 5051 "ssl/ssl_lib.c"
36056 ;
36057 }
36058
36059 const SSL_CIPHER *SSL_get_pending_cipher(const SSL *s)
36060 {
36061 const SSL_CONNECTION *sc = ((s) ==
36062 # 5056 "ssl/ssl_lib.c" 3 4
36063 ((void *)0)
36064 # 5056 "ssl/ssl_lib.c"
36065 ?
36066 # 5056 "ssl/ssl_lib.c" 3 4
36067 ((void *)0)
36068 # 5056 "ssl/ssl_lib.c"
36069 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
36070 # 5056 "ssl/ssl_lib.c" 3 4
36071 ((void *)0)
36072 # 5056 "ssl/ssl_lib.c"
36073 )));
36074
36075 if (sc ==
36076 # 5058 "ssl/ssl_lib.c" 3 4
36077 ((void *)0)
36078 # 5058 "ssl/ssl_lib.c"
36079 )
36080 return
36081 # 5059 "ssl/ssl_lib.c" 3 4
36082 ((void *)0)
36083 # 5059 "ssl/ssl_lib.c"
36084 ;
36085
36086 return sc->s3.tmp.new_cipher;
36087 }
36088
36089 const COMP_METHOD *SSL_get_current_compression(const SSL *s)
36090 {
36091
36092 const SSL_CONNECTION *sc = ((s) ==
36093 # 5067 "ssl/ssl_lib.c" 3 4
36094 ((void *)0)
36095 # 5067 "ssl/ssl_lib.c"
36096 ?
36097 # 5067 "ssl/ssl_lib.c" 3 4
36098 ((void *)0)
36099 # 5067 "ssl/ssl_lib.c"
36100 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) :
36101 # 5067 "ssl/ssl_lib.c" 3 4
36102 ((void *)0)
36103 # 5067 "ssl/ssl_lib.c"
36104 ));
36105
36106 if (sc ==
36107 # 5069 "ssl/ssl_lib.c" 3 4
36108 ((void *)0)
36109 # 5069 "ssl/ssl_lib.c"
36110 )
36111 return
36112 # 5070 "ssl/ssl_lib.c" 3 4
36113 ((void *)0)
36114 # 5070 "ssl/ssl_lib.c"
36115 ;
36116
36117 return sc->rlayer.wrlmethod->get_compression(sc->rlayer.wrl);
36118
36119
36120
36121 }
36122
36123 const COMP_METHOD *SSL_get_current_expansion(const SSL *s)
36124 {
36125
36126 const SSL_CONNECTION *sc = ((s) ==
36127 # 5081 "ssl/ssl_lib.c" 3 4
36128 ((void *)0)
36129 # 5081 "ssl/ssl_lib.c"
36130 ?
36131 # 5081 "ssl/ssl_lib.c" 3 4
36132 ((void *)0)
36133 # 5081 "ssl/ssl_lib.c"
36134 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) :
36135 # 5081 "ssl/ssl_lib.c" 3 4
36136 ((void *)0)
36137 # 5081 "ssl/ssl_lib.c"
36138 ));
36139
36140 if (sc ==
36141 # 5083 "ssl/ssl_lib.c" 3 4
36142 ((void *)0)
36143 # 5083 "ssl/ssl_lib.c"
36144 )
36145 return
36146 # 5084 "ssl/ssl_lib.c" 3 4
36147 ((void *)0)
36148 # 5084 "ssl/ssl_lib.c"
36149 ;
36150
36151 return sc->rlayer.rrlmethod->get_compression(sc->rlayer.rrl);
36152
36153
36154
36155 }
36156
36157 int ssl_init_wbio_buffer(SSL_CONNECTION *s)
36158 {
36159 BIO *bbio;
36160
36161 if (s->bbio !=
36162 # 5096 "ssl/ssl_lib.c" 3 4
36163 ((void *)0)
36164 # 5096 "ssl/ssl_lib.c"
36165 ) {
36166
36167 return 1;
36168 }
36169
36170 bbio = BIO_new(BIO_f_buffer());
36171 if (bbio ==
36172 # 5102 "ssl/ssl_lib.c" 3 4
36173 ((void *)0)
36174 # 5102 "ssl/ssl_lib.c"
36175 || BIO_int_ctrl(bbio,117,1,0) <= 0) {
36176 BIO_free(bbio);
36177 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",5104,__func__), ERR_set_error)((20),((7 | (0x2 << 18L))),
36178 # 5104 "ssl/ssl_lib.c" 3 4
36179 ((void *)0)
36180 # 5104 "ssl/ssl_lib.c"
36181 );
36182 return 0;
36183 }
36184 s->bbio = bbio;
36185 s->wbio = BIO_push(bbio, s->wbio);
36186
36187 s->rlayer.wrlmethod->set1_bio(s->rlayer.wrl, s->wbio);
36188
36189 return 1;
36190 }
36191
36192 int ssl_free_wbio_buffer(SSL_CONNECTION *s)
36193 {
36194
36195 if (s->bbio ==
36196 # 5118 "ssl/ssl_lib.c" 3 4
36197 ((void *)0)
36198 # 5118 "ssl/ssl_lib.c"
36199 )
36200 return 1;
36201
36202 s->wbio = BIO_pop(s->wbio);
36203 s->rlayer.wrlmethod->set1_bio(s->rlayer.wrl, s->wbio);
36204
36205 BIO_free(s->bbio);
36206 s->bbio =
36207 # 5125 "ssl/ssl_lib.c" 3 4
36208 ((void *)0)
36209 # 5125 "ssl/ssl_lib.c"
36210 ;
36211
36212 return 1;
36213 }
36214
36215 void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode)
36216 {
36217 ctx->quiet_shutdown = mode;
36218 }
36219
36220 int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx)
36221 {
36222 return ctx->quiet_shutdown;
36223 }
36224
36225 void SSL_set_quiet_shutdown(SSL *s, int mode)
36226 {
36227 SSL_CONNECTION *sc = ((s) ==
36228 # 5142 "ssl/ssl_lib.c" 3 4
36229 ((void *)0)
36230 # 5142 "ssl/ssl_lib.c"
36231 ?
36232 # 5142 "ssl/ssl_lib.c" 3 4
36233 ((void *)0)
36234 # 5142 "ssl/ssl_lib.c"
36235 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
36236 # 5142 "ssl/ssl_lib.c" 3 4
36237 ((void *)0)
36238 # 5142 "ssl/ssl_lib.c"
36239 ));
36240
36241
36242 if (sc ==
36243 # 5145 "ssl/ssl_lib.c" 3 4
36244 ((void *)0)
36245 # 5145 "ssl/ssl_lib.c"
36246 )
36247 return;
36248
36249 sc->quiet_shutdown = mode;
36250 }
36251
36252 int SSL_get_quiet_shutdown(const SSL *s)
36253 {
36254 const SSL_CONNECTION *sc = ((s) ==
36255 # 5153 "ssl/ssl_lib.c" 3 4
36256 ((void *)0)
36257 # 5153 "ssl/ssl_lib.c"
36258 ?
36259 # 5153 "ssl/ssl_lib.c" 3 4
36260 ((void *)0)
36261 # 5153 "ssl/ssl_lib.c"
36262 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) :
36263 # 5153 "ssl/ssl_lib.c" 3 4
36264 ((void *)0)
36265 # 5153 "ssl/ssl_lib.c"
36266 ));
36267
36268
36269 if (sc ==
36270 # 5156 "ssl/ssl_lib.c" 3 4
36271 ((void *)0)
36272 # 5156 "ssl/ssl_lib.c"
36273 )
36274 return 0;
36275
36276 return sc->quiet_shutdown;
36277 }
36278
36279 void SSL_set_shutdown(SSL *s, int mode)
36280 {
36281 SSL_CONNECTION *sc = ((s) ==
36282 # 5164 "ssl/ssl_lib.c" 3 4
36283 ((void *)0)
36284 # 5164 "ssl/ssl_lib.c"
36285 ?
36286 # 5164 "ssl/ssl_lib.c" 3 4
36287 ((void *)0)
36288 # 5164 "ssl/ssl_lib.c"
36289 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
36290 # 5164 "ssl/ssl_lib.c" 3 4
36291 ((void *)0)
36292 # 5164 "ssl/ssl_lib.c"
36293 ));
36294
36295
36296 if (sc ==
36297 # 5167 "ssl/ssl_lib.c" 3 4
36298 ((void *)0)
36299 # 5167 "ssl/ssl_lib.c"
36300 )
36301 return;
36302
36303 sc->shutdown = mode;
36304 }
36305
36306 int SSL_get_shutdown(const SSL *s)
36307 {
36308 const SSL_CONNECTION *sc = ((s) ==
36309 # 5175 "ssl/ssl_lib.c" 3 4
36310 ((void *)0)
36311 # 5175 "ssl/ssl_lib.c"
36312 ?
36313 # 5175 "ssl/ssl_lib.c" 3 4
36314 ((void *)0)
36315 # 5175 "ssl/ssl_lib.c"
36316 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) :
36317 # 5175 "ssl/ssl_lib.c" 3 4
36318 ((void *)0)
36319 # 5175 "ssl/ssl_lib.c"
36320 ));
36321
36322
36323
36324 if (((s) !=
36325 # 5179 "ssl/ssl_lib.c" 3 4
36326 ((void *)0)
36327 # 5179 "ssl/ssl_lib.c"
36328 && ((s)->type == 1 || (s)->type == 2)))
36329 return ossl_quic_get_shutdown(s);
36330
36331
36332 if (sc ==
36333 # 5183 "ssl/ssl_lib.c" 3 4
36334 ((void *)0)
36335 # 5183 "ssl/ssl_lib.c"
36336 )
36337 return 0;
36338
36339 return sc->shutdown;
36340 }
36341
36342 int SSL_version(const SSL *s)
36343 {
36344 const SSL_CONNECTION *sc = ((s) ==
36345 # 5191 "ssl/ssl_lib.c" 3 4
36346 ((void *)0)
36347 # 5191 "ssl/ssl_lib.c"
36348 ?
36349 # 5191 "ssl/ssl_lib.c" 3 4
36350 ((void *)0)
36351 # 5191 "ssl/ssl_lib.c"
36352 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
36353 # 5191 "ssl/ssl_lib.c" 3 4
36354 ((void *)0)
36355 # 5191 "ssl/ssl_lib.c"
36356 )));
36357
36358
36359
36360 if (s->type == 1 || s->type == 2)
36361 return 0x0000001;
36362
36363 if (sc ==
36364 # 5198 "ssl/ssl_lib.c" 3 4
36365 ((void *)0)
36366 # 5198 "ssl/ssl_lib.c"
36367 )
36368 return 0;
36369
36370 return sc->version;
36371 }
36372
36373 int SSL_client_version(const SSL *s)
36374 {
36375 const SSL_CONNECTION *sc = ((s) ==
36376 # 5206 "ssl/ssl_lib.c" 3 4
36377 ((void *)0)
36378 # 5206 "ssl/ssl_lib.c"
36379 ?
36380 # 5206 "ssl/ssl_lib.c" 3 4
36381 ((void *)0)
36382 # 5206 "ssl/ssl_lib.c"
36383 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
36384 # 5206 "ssl/ssl_lib.c" 3 4
36385 ((void *)0)
36386 # 5206 "ssl/ssl_lib.c"
36387 )));
36388
36389
36390
36391 if (s->type == 1 || s->type == 2)
36392 return 0x0000001;
36393
36394 if (sc ==
36395 # 5213 "ssl/ssl_lib.c" 3 4
36396 ((void *)0)
36397 # 5213 "ssl/ssl_lib.c"
36398 )
36399 return 0;
36400
36401 return sc->client_version;
36402 }
36403
36404 SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl)
36405 {
36406 return ssl->ctx;
36407 }
36408
36409 SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx)
36410 {
36411 CERT *new_cert;
36412 SSL_CONNECTION *sc = ((ssl) ==
36413 # 5227 "ssl/ssl_lib.c" 3 4
36414 ((void *)0)
36415 # 5227 "ssl/ssl_lib.c"
36416 ?
36417 # 5227 "ssl/ssl_lib.c" 3 4
36418 ((void *)0)
36419 # 5227 "ssl/ssl_lib.c"
36420 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) :
36421 # 5227 "ssl/ssl_lib.c" 3 4
36422 ((void *)0)
36423 # 5227 "ssl/ssl_lib.c"
36424 ));
36425
36426
36427 if (sc ==
36428 # 5230 "ssl/ssl_lib.c" 3 4
36429 ((void *)0)
36430 # 5230 "ssl/ssl_lib.c"
36431 )
36432 return
36433 # 5231 "ssl/ssl_lib.c" 3 4
36434 ((void *)0)
36435 # 5231 "ssl/ssl_lib.c"
36436 ;
36437
36438 if (ssl->ctx == ctx)
36439 return ssl->ctx;
36440 if (ctx ==
36441 # 5235 "ssl/ssl_lib.c" 3 4
36442 ((void *)0)
36443 # 5235 "ssl/ssl_lib.c"
36444 )
36445 ctx = sc->session_ctx;
36446 new_cert = ssl_cert_dup(ctx->cert);
36447 if (new_cert ==
36448 # 5238 "ssl/ssl_lib.c" 3 4
36449 ((void *)0)
36450 # 5238 "ssl/ssl_lib.c"
36451 ) {
36452 return
36453 # 5239 "ssl/ssl_lib.c" 3 4
36454 ((void *)0)
36455 # 5239 "ssl/ssl_lib.c"
36456 ;
36457 }
36458
36459 if (!custom_exts_copy_flags(&new_cert->custext, &sc->cert->custext)) {
36460 ssl_cert_free(new_cert);
36461 return
36462 # 5244 "ssl/ssl_lib.c" 3 4
36463 ((void *)0)
36464 # 5244 "ssl/ssl_lib.c"
36465 ;
36466 }
36467
36468 ssl_cert_free(sc->cert);
36469 sc->cert = new_cert;
36470
36471
36472
36473
36474
36475 if (!__builtin_expect(!!((sc->sid_ctx_length <= sizeof(sc->sid_ctx)) != 0), 1))
36476 return
36477 # 5255 "ssl/ssl_lib.c" 3 4
36478 ((void *)0)
36479 # 5255 "ssl/ssl_lib.c"
36480 ;
36481
36482
36483
36484
36485
36486
36487
36488 if ((ssl->ctx !=
36489 # 5263 "ssl/ssl_lib.c" 3 4
36490 ((void *)0)
36491 # 5263 "ssl/ssl_lib.c"
36492 ) &&
36493 (sc->sid_ctx_length == ssl->ctx->sid_ctx_length) &&
36494 (memcmp(sc->sid_ctx, ssl->ctx->sid_ctx, sc->sid_ctx_length) == 0)) {
36495 sc->sid_ctx_length = ctx->sid_ctx_length;
36496 memcpy(&sc->sid_ctx, &ctx->sid_ctx, sizeof(sc->sid_ctx));
36497 }
36498
36499 SSL_CTX_up_ref(ctx);
36500 SSL_CTX_free(ssl->ctx);
36501 ssl->ctx = ctx;
36502
36503 return ssl->ctx;
36504 }
36505
36506 int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx)
36507 {
36508 return X509_STORE_set_default_paths_ex(ctx->cert_store, ctx->libctx,
36509 ctx->propq);
36510 }
36511
36512 int SSL_CTX_set_default_verify_dir(SSL_CTX *ctx)
36513 {
36514 X509_LOOKUP *lookup;
36515
36516 lookup = X509_STORE_add_lookup(ctx->cert_store, X509_LOOKUP_hash_dir());
36517 if (lookup ==
36518 # 5288 "ssl/ssl_lib.c" 3 4
36519 ((void *)0)
36520 # 5288 "ssl/ssl_lib.c"
36521 )
36522 return 0;
36523
36524
36525 ERR_set_mark();
36526
36527 X509_LOOKUP_ctrl((lookup),2,(
36528 # 5294 "ssl/ssl_lib.c" 3 4
36529 ((void *)0)
36530 # 5294 "ssl/ssl_lib.c"
36531 ),(long)(3),
36532 # 5294 "ssl/ssl_lib.c" 3 4
36533 ((void *)0)
36534 # 5294 "ssl/ssl_lib.c"
36535 );
36536
36537 ERR_pop_to_mark();
36538
36539 return 1;
36540 }
36541
36542 int SSL_CTX_set_default_verify_file(SSL_CTX *ctx)
36543 {
36544 X509_LOOKUP *lookup;
36545
36546 lookup = X509_STORE_add_lookup(ctx->cert_store, X509_LOOKUP_file());
36547 if (lookup ==
36548 # 5306 "ssl/ssl_lib.c" 3 4
36549 ((void *)0)
36550 # 5306 "ssl/ssl_lib.c"
36551 )
36552 return 0;
36553
36554
36555 ERR_set_mark();
36556
36557 X509_LOOKUP_ctrl_ex((lookup), 1, (
36558 # 5312 "ssl/ssl_lib.c" 3 4
36559 ((void *)0)
36560 # 5312 "ssl/ssl_lib.c"
36561 ), (long)(3),
36562 # 5312 "ssl/ssl_lib.c" 3 4
36563 ((void *)0)
36564 # 5312 "ssl/ssl_lib.c"
36565 , (ctx->libctx), (ctx->propq))
36566 ;
36567
36568 ERR_pop_to_mark();
36569
36570 return 1;
36571 }
36572
36573 int SSL_CTX_set_default_verify_store(SSL_CTX *ctx)
36574 {
36575 X509_LOOKUP *lookup;
36576
36577 lookup = X509_STORE_add_lookup(ctx->cert_store, X509_LOOKUP_store());
36578 if (lookup ==
36579 # 5325 "ssl/ssl_lib.c" 3 4
36580 ((void *)0)
36581 # 5325 "ssl/ssl_lib.c"
36582 )
36583 return 0;
36584
36585
36586 ERR_set_mark();
36587
36588 X509_LOOKUP_ctrl_ex((lookup), 3, (
36589 # 5331 "ssl/ssl_lib.c" 3 4
36590 ((void *)0)
36591 # 5331 "ssl/ssl_lib.c"
36592 ), 0,
36593 # 5331 "ssl/ssl_lib.c" 3 4
36594 ((void *)0)
36595 # 5331 "ssl/ssl_lib.c"
36596 , (ctx->libctx), (ctx->propq));
36597
36598 ERR_pop_to_mark();
36599
36600 return 1;
36601 }
36602
36603 int SSL_CTX_load_verify_file(SSL_CTX *ctx, const char *CAfile)
36604 {
36605 return X509_STORE_load_file_ex(ctx->cert_store, CAfile, ctx->libctx,
36606 ctx->propq);
36607 }
36608
36609 int SSL_CTX_load_verify_dir(SSL_CTX *ctx, const char *CApath)
36610 {
36611 return X509_STORE_load_path(ctx->cert_store, CApath);
36612 }
36613
36614 int SSL_CTX_load_verify_store(SSL_CTX *ctx, const char *CAstore)
36615 {
36616 return X509_STORE_load_store_ex(ctx->cert_store, CAstore, ctx->libctx,
36617 ctx->propq);
36618 }
36619
36620 int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
36621 const char *CApath)
36622 {
36623 if (CAfile ==
36624 # 5358 "ssl/ssl_lib.c" 3 4
36625 ((void *)0)
36626 # 5358 "ssl/ssl_lib.c"
36627 && CApath ==
36628 # 5358 "ssl/ssl_lib.c" 3 4
36629 ((void *)0)
36630 # 5358 "ssl/ssl_lib.c"
36631 )
36632 return 0;
36633 if (CAfile !=
36634 # 5360 "ssl/ssl_lib.c" 3 4
36635 ((void *)0)
36636 # 5360 "ssl/ssl_lib.c"
36637 && !SSL_CTX_load_verify_file(ctx, CAfile))
36638 return 0;
36639 if (CApath !=
36640 # 5362 "ssl/ssl_lib.c" 3 4
36641 ((void *)0)
36642 # 5362 "ssl/ssl_lib.c"
36643 && !SSL_CTX_load_verify_dir(ctx, CApath))
36644 return 0;
36645 return 1;
36646 }
36647
36648 void SSL_set_info_callback(SSL *ssl,
36649 void (*cb) (const SSL *ssl, int type, int val))
36650 {
36651 SSL_CONNECTION *sc = ((ssl) ==
36652 # 5370 "ssl/ssl_lib.c" 3 4
36653 ((void *)0)
36654 # 5370 "ssl/ssl_lib.c"
36655 ?
36656 # 5370 "ssl/ssl_lib.c" 3 4
36657 ((void *)0)
36658 # 5370 "ssl/ssl_lib.c"
36659 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls :
36660 # 5370 "ssl/ssl_lib.c" 3 4
36661 ((void *)0)
36662 # 5370 "ssl/ssl_lib.c"
36663 )));
36664
36665 if (sc ==
36666 # 5372 "ssl/ssl_lib.c" 3 4
36667 ((void *)0)
36668 # 5372 "ssl/ssl_lib.c"
36669 )
36670 return;
36671
36672 sc->info_callback = cb;
36673 }
36674
36675
36676
36677
36678
36679 void (*SSL_get_info_callback(const SSL *ssl)) (const SSL * ,
36680 int ,
36681 int ) {
36682 const SSL_CONNECTION *sc = ((ssl) ==
36683 # 5385 "ssl/ssl_lib.c" 3 4
36684 ((void *)0)
36685 # 5385 "ssl/ssl_lib.c"
36686 ?
36687 # 5385 "ssl/ssl_lib.c" 3 4
36688 ((void *)0)
36689 # 5385 "ssl/ssl_lib.c"
36690 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls :
36691 # 5385 "ssl/ssl_lib.c" 3 4
36692 ((void *)0)
36693 # 5385 "ssl/ssl_lib.c"
36694 )));
36695
36696 if (sc ==
36697 # 5387 "ssl/ssl_lib.c" 3 4
36698 ((void *)0)
36699 # 5387 "ssl/ssl_lib.c"
36700 )
36701 return
36702 # 5388 "ssl/ssl_lib.c" 3 4
36703 ((void *)0)
36704 # 5388 "ssl/ssl_lib.c"
36705 ;
36706
36707 return sc->info_callback;
36708 }
36709
36710 void SSL_set_verify_result(SSL *ssl, long arg)
36711 {
36712 SSL_CONNECTION *sc = ((ssl) ==
36713 # 5395 "ssl/ssl_lib.c" 3 4
36714 ((void *)0)
36715 # 5395 "ssl/ssl_lib.c"
36716 ?
36717 # 5395 "ssl/ssl_lib.c" 3 4
36718 ((void *)0)
36719 # 5395 "ssl/ssl_lib.c"
36720 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls :
36721 # 5395 "ssl/ssl_lib.c" 3 4
36722 ((void *)0)
36723 # 5395 "ssl/ssl_lib.c"
36724 )));
36725
36726 if (sc ==
36727 # 5397 "ssl/ssl_lib.c" 3 4
36728 ((void *)0)
36729 # 5397 "ssl/ssl_lib.c"
36730 )
36731 return;
36732
36733 sc->verify_result = arg;
36734 }
36735
36736 long SSL_get_verify_result(const SSL *ssl)
36737 {
36738 const SSL_CONNECTION *sc = ((ssl) ==
36739 # 5405 "ssl/ssl_lib.c" 3 4
36740 ((void *)0)
36741 # 5405 "ssl/ssl_lib.c"
36742 ?
36743 # 5405 "ssl/ssl_lib.c" 3 4
36744 ((void *)0)
36745 # 5405 "ssl/ssl_lib.c"
36746 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls :
36747 # 5405 "ssl/ssl_lib.c" 3 4
36748 ((void *)0)
36749 # 5405 "ssl/ssl_lib.c"
36750 )));
36751
36752 if (sc ==
36753 # 5407 "ssl/ssl_lib.c" 3 4
36754 ((void *)0)
36755 # 5407 "ssl/ssl_lib.c"
36756 )
36757 return 0;
36758
36759 return sc->verify_result;
36760 }
36761
36762 size_t SSL_get_client_random(const SSL *ssl, unsigned char *out, size_t outlen)
36763 {
36764 const SSL_CONNECTION *sc = ((ssl) ==
36765 # 5415 "ssl/ssl_lib.c" 3 4
36766 ((void *)0)
36767 # 5415 "ssl/ssl_lib.c"
36768 ?
36769 # 5415 "ssl/ssl_lib.c" 3 4
36770 ((void *)0)
36771 # 5415 "ssl/ssl_lib.c"
36772 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls :
36773 # 5415 "ssl/ssl_lib.c" 3 4
36774 ((void *)0)
36775 # 5415 "ssl/ssl_lib.c"
36776 )));
36777
36778 if (sc ==
36779 # 5417 "ssl/ssl_lib.c" 3 4
36780 ((void *)0)
36781 # 5417 "ssl/ssl_lib.c"
36782 )
36783 return 0;
36784
36785 if (outlen == 0)
36786 return sizeof(sc->s3.client_random);
36787 if (outlen > sizeof(sc->s3.client_random))
36788 outlen = sizeof(sc->s3.client_random);
36789 memcpy(out, sc->s3.client_random, outlen);
36790 return outlen;
36791 }
36792
36793 size_t SSL_get_server_random(const SSL *ssl, unsigned char *out, size_t outlen)
36794 {
36795 const SSL_CONNECTION *sc = ((ssl) ==
36796 # 5430 "ssl/ssl_lib.c" 3 4
36797 ((void *)0)
36798 # 5430 "ssl/ssl_lib.c"
36799 ?
36800 # 5430 "ssl/ssl_lib.c" 3 4
36801 ((void *)0)
36802 # 5430 "ssl/ssl_lib.c"
36803 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls :
36804 # 5430 "ssl/ssl_lib.c" 3 4
36805 ((void *)0)
36806 # 5430 "ssl/ssl_lib.c"
36807 )));
36808
36809 if (sc ==
36810 # 5432 "ssl/ssl_lib.c" 3 4
36811 ((void *)0)
36812 # 5432 "ssl/ssl_lib.c"
36813 )
36814 return 0;
36815
36816 if (outlen == 0)
36817 return sizeof(sc->s3.server_random);
36818 if (outlen > sizeof(sc->s3.server_random))
36819 outlen = sizeof(sc->s3.server_random);
36820 memcpy(out, sc->s3.server_random, outlen);
36821 return outlen;
36822 }
36823
36824 size_t SSL_SESSION_get_master_key(const SSL_SESSION *session,
36825 unsigned char *out, size_t outlen)
36826 {
36827 if (outlen == 0)
36828 return session->master_key_length;
36829 if (outlen > session->master_key_length)
36830 outlen = session->master_key_length;
36831 memcpy(out, session->master_key, outlen);
36832 return outlen;
36833 }
36834
36835 int SSL_SESSION_set1_master_key(SSL_SESSION *sess, const unsigned char *in,
36836 size_t len)
36837 {
36838 if (len > sizeof(sess->master_key))
36839 return 0;
36840
36841 memcpy(sess->master_key, in, len);
36842 sess->master_key_length = len;
36843 return 1;
36844 }
36845
36846
36847 int SSL_set_ex_data(SSL *s, int idx, void *arg)
36848 {
36849 return CRYPTO_set_ex_data(&s->ex_data, idx, arg);
36850 }
36851
36852 void *SSL_get_ex_data(const SSL *s, int idx)
36853 {
36854 return CRYPTO_get_ex_data(&s->ex_data, idx);
36855 }
36856
36857 int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg)
36858 {
36859 return CRYPTO_set_ex_data(&s->ex_data, idx, arg);
36860 }
36861
36862 void *SSL_CTX_get_ex_data(const SSL_CTX *s, int idx)
36863 {
36864 return CRYPTO_get_ex_data(&s->ex_data, idx);
36865 }
36866
36867 X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *ctx)
36868 {
36869 return ctx->cert_store;
36870 }
36871
36872 void SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *store)
36873 {
36874 X509_STORE_free(ctx->cert_store);
36875 ctx->cert_store = store;
36876 }
36877
36878 void SSL_CTX_set1_cert_store(SSL_CTX *ctx, X509_STORE *store)
36879 {
36880 if (store !=
36881 # 5499 "ssl/ssl_lib.c" 3 4
36882 ((void *)0)
36883 # 5499 "ssl/ssl_lib.c"
36884 )
36885 X509_STORE_up_ref(store);
36886 SSL_CTX_set_cert_store(ctx, store);
36887 }
36888
36889 int SSL_want(const SSL *s)
36890 {
36891 const SSL_CONNECTION *sc = ((s) ==
36892 # 5506 "ssl/ssl_lib.c" 3 4
36893 ((void *)0)
36894 # 5506 "ssl/ssl_lib.c"
36895 ?
36896 # 5506 "ssl/ssl_lib.c" 3 4
36897 ((void *)0)
36898 # 5506 "ssl/ssl_lib.c"
36899 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
36900 # 5506 "ssl/ssl_lib.c" 3 4
36901 ((void *)0)
36902 # 5506 "ssl/ssl_lib.c"
36903 )));
36904
36905
36906 if (((s) !=
36907 # 5509 "ssl/ssl_lib.c" 3 4
36908 ((void *)0)
36909 # 5509 "ssl/ssl_lib.c"
36910 && ((s)->type == 1 || (s)->type == 2)))
36911 return ossl_quic_want(s);
36912
36913
36914 if (sc ==
36915 # 5513 "ssl/ssl_lib.c" 3 4
36916 ((void *)0)
36917 # 5513 "ssl/ssl_lib.c"
36918 )
36919 return 1;
36920
36921 return sc->rwstate;
36922 }
36923
36924
36925 int SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *identity_hint)
36926 {
36927 if (identity_hint !=
36928 # 5522 "ssl/ssl_lib.c" 3 4
36929 ((void *)0)
36930 # 5522 "ssl/ssl_lib.c"
36931 && strlen(identity_hint) > 256) {
36932 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",5523,__func__), ERR_set_error)((20),(146),
36933 # 5523 "ssl/ssl_lib.c" 3 4
36934 ((void *)0)
36935 # 5523 "ssl/ssl_lib.c"
36936 );
36937 return 0;
36938 }
36939 CRYPTO_free(ctx->cert->psk_identity_hint, "ssl/ssl_lib.c", 5526);
36940 if (identity_hint !=
36941 # 5527 "ssl/ssl_lib.c" 3 4
36942 ((void *)0)
36943 # 5527 "ssl/ssl_lib.c"
36944 ) {
36945 ctx->cert->psk_identity_hint = CRYPTO_strdup(identity_hint, "ssl/ssl_lib.c", 5528);
36946 if (ctx->cert->psk_identity_hint ==
36947 # 5529 "ssl/ssl_lib.c" 3 4
36948 ((void *)0)
36949 # 5529 "ssl/ssl_lib.c"
36950 )
36951 return 0;
36952 } else
36953 ctx->cert->psk_identity_hint =
36954 # 5532 "ssl/ssl_lib.c" 3 4
36955 ((void *)0)
36956 # 5532 "ssl/ssl_lib.c"
36957 ;
36958 return 1;
36959 }
36960
36961 int SSL_use_psk_identity_hint(SSL *s, const char *identity_hint)
36962 {
36963 SSL_CONNECTION *sc = ((s) ==
36964 # 5538 "ssl/ssl_lib.c" 3 4
36965 ((void *)0)
36966 # 5538 "ssl/ssl_lib.c"
36967 ?
36968 # 5538 "ssl/ssl_lib.c" 3 4
36969 ((void *)0)
36970 # 5538 "ssl/ssl_lib.c"
36971 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
36972 # 5538 "ssl/ssl_lib.c" 3 4
36973 ((void *)0)
36974 # 5538 "ssl/ssl_lib.c"
36975 )));
36976
36977 if (sc ==
36978 # 5540 "ssl/ssl_lib.c" 3 4
36979 ((void *)0)
36980 # 5540 "ssl/ssl_lib.c"
36981 )
36982 return 0;
36983
36984 if (identity_hint !=
36985 # 5543 "ssl/ssl_lib.c" 3 4
36986 ((void *)0)
36987 # 5543 "ssl/ssl_lib.c"
36988 && strlen(identity_hint) > 256) {
36989 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",5544,__func__), ERR_set_error)((20),(146),
36990 # 5544 "ssl/ssl_lib.c" 3 4
36991 ((void *)0)
36992 # 5544 "ssl/ssl_lib.c"
36993 );
36994 return 0;
36995 }
36996 CRYPTO_free(sc->cert->psk_identity_hint, "ssl/ssl_lib.c", 5547);
36997 if (identity_hint !=
36998 # 5548 "ssl/ssl_lib.c" 3 4
36999 ((void *)0)
37000 # 5548 "ssl/ssl_lib.c"
37001 ) {
37002 sc->cert->psk_identity_hint = CRYPTO_strdup(identity_hint, "ssl/ssl_lib.c", 5549);
37003 if (sc->cert->psk_identity_hint ==
37004 # 5550 "ssl/ssl_lib.c" 3 4
37005 ((void *)0)
37006 # 5550 "ssl/ssl_lib.c"
37007 )
37008 return 0;
37009 } else
37010 sc->cert->psk_identity_hint =
37011 # 5553 "ssl/ssl_lib.c" 3 4
37012 ((void *)0)
37013 # 5553 "ssl/ssl_lib.c"
37014 ;
37015 return 1;
37016 }
37017
37018 const char *SSL_get_psk_identity_hint(const SSL *s)
37019 {
37020 const SSL_CONNECTION *sc = ((s) ==
37021 # 5559 "ssl/ssl_lib.c" 3 4
37022 ((void *)0)
37023 # 5559 "ssl/ssl_lib.c"
37024 ?
37025 # 5559 "ssl/ssl_lib.c" 3 4
37026 ((void *)0)
37027 # 5559 "ssl/ssl_lib.c"
37028 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
37029 # 5559 "ssl/ssl_lib.c" 3 4
37030 ((void *)0)
37031 # 5559 "ssl/ssl_lib.c"
37032 )));
37033
37034 if (sc ==
37035 # 5561 "ssl/ssl_lib.c" 3 4
37036 ((void *)0)
37037 # 5561 "ssl/ssl_lib.c"
37038 || sc->session ==
37039 # 5561 "ssl/ssl_lib.c" 3 4
37040 ((void *)0)
37041 # 5561 "ssl/ssl_lib.c"
37042 )
37043 return
37044 # 5562 "ssl/ssl_lib.c" 3 4
37045 ((void *)0)
37046 # 5562 "ssl/ssl_lib.c"
37047 ;
37048
37049 return sc->session->psk_identity_hint;
37050 }
37051
37052 const char *SSL_get_psk_identity(const SSL *s)
37053 {
37054 const SSL_CONNECTION *sc = ((s) ==
37055 # 5569 "ssl/ssl_lib.c" 3 4
37056 ((void *)0)
37057 # 5569 "ssl/ssl_lib.c"
37058 ?
37059 # 5569 "ssl/ssl_lib.c" 3 4
37060 ((void *)0)
37061 # 5569 "ssl/ssl_lib.c"
37062 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
37063 # 5569 "ssl/ssl_lib.c" 3 4
37064 ((void *)0)
37065 # 5569 "ssl/ssl_lib.c"
37066 )));
37067
37068 if (sc ==
37069 # 5571 "ssl/ssl_lib.c" 3 4
37070 ((void *)0)
37071 # 5571 "ssl/ssl_lib.c"
37072 || sc->session ==
37073 # 5571 "ssl/ssl_lib.c" 3 4
37074 ((void *)0)
37075 # 5571 "ssl/ssl_lib.c"
37076 )
37077 return
37078 # 5572 "ssl/ssl_lib.c" 3 4
37079 ((void *)0)
37080 # 5572 "ssl/ssl_lib.c"
37081 ;
37082
37083 return sc->session->psk_identity;
37084 }
37085
37086 void SSL_set_psk_client_callback(SSL *s, SSL_psk_client_cb_func cb)
37087 {
37088 SSL_CONNECTION *sc = ((s) ==
37089 # 5579 "ssl/ssl_lib.c" 3 4
37090 ((void *)0)
37091 # 5579 "ssl/ssl_lib.c"
37092 ?
37093 # 5579 "ssl/ssl_lib.c" 3 4
37094 ((void *)0)
37095 # 5579 "ssl/ssl_lib.c"
37096 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
37097 # 5579 "ssl/ssl_lib.c" 3 4
37098 ((void *)0)
37099 # 5579 "ssl/ssl_lib.c"
37100 )));
37101
37102 if (sc ==
37103 # 5581 "ssl/ssl_lib.c" 3 4
37104 ((void *)0)
37105 # 5581 "ssl/ssl_lib.c"
37106 )
37107 return;
37108
37109 sc->psk_client_callback = cb;
37110 }
37111
37112 void SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, SSL_psk_client_cb_func cb)
37113 {
37114 ctx->psk_client_callback = cb;
37115 }
37116
37117 void SSL_set_psk_server_callback(SSL *s, SSL_psk_server_cb_func cb)
37118 {
37119 SSL_CONNECTION *sc = ((s) ==
37120 # 5594 "ssl/ssl_lib.c" 3 4
37121 ((void *)0)
37122 # 5594 "ssl/ssl_lib.c"
37123 ?
37124 # 5594 "ssl/ssl_lib.c" 3 4
37125 ((void *)0)
37126 # 5594 "ssl/ssl_lib.c"
37127 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
37128 # 5594 "ssl/ssl_lib.c" 3 4
37129 ((void *)0)
37130 # 5594 "ssl/ssl_lib.c"
37131 )));
37132
37133 if (sc ==
37134 # 5596 "ssl/ssl_lib.c" 3 4
37135 ((void *)0)
37136 # 5596 "ssl/ssl_lib.c"
37137 )
37138 return;
37139
37140 sc->psk_server_callback = cb;
37141 }
37142
37143 void SSL_CTX_set_psk_server_callback(SSL_CTX *ctx, SSL_psk_server_cb_func cb)
37144 {
37145 ctx->psk_server_callback = cb;
37146 }
37147
37148
37149 void SSL_set_psk_find_session_callback(SSL *s, SSL_psk_find_session_cb_func cb)
37150 {
37151 SSL_CONNECTION *sc = ((s) ==
37152 # 5610 "ssl/ssl_lib.c" 3 4
37153 ((void *)0)
37154 # 5610 "ssl/ssl_lib.c"
37155 ?
37156 # 5610 "ssl/ssl_lib.c" 3 4
37157 ((void *)0)
37158 # 5610 "ssl/ssl_lib.c"
37159 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
37160 # 5610 "ssl/ssl_lib.c" 3 4
37161 ((void *)0)
37162 # 5610 "ssl/ssl_lib.c"
37163 )));
37164
37165 if (sc ==
37166 # 5612 "ssl/ssl_lib.c" 3 4
37167 ((void *)0)
37168 # 5612 "ssl/ssl_lib.c"
37169 )
37170 return;
37171
37172 sc->psk_find_session_cb = cb;
37173 }
37174
37175 void SSL_CTX_set_psk_find_session_callback(SSL_CTX *ctx,
37176 SSL_psk_find_session_cb_func cb)
37177 {
37178 ctx->psk_find_session_cb = cb;
37179 }
37180
37181 void SSL_set_psk_use_session_callback(SSL *s, SSL_psk_use_session_cb_func cb)
37182 {
37183 SSL_CONNECTION *sc = ((s) ==
37184 # 5626 "ssl/ssl_lib.c" 3 4
37185 ((void *)0)
37186 # 5626 "ssl/ssl_lib.c"
37187 ?
37188 # 5626 "ssl/ssl_lib.c" 3 4
37189 ((void *)0)
37190 # 5626 "ssl/ssl_lib.c"
37191 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
37192 # 5626 "ssl/ssl_lib.c" 3 4
37193 ((void *)0)
37194 # 5626 "ssl/ssl_lib.c"
37195 )));
37196
37197 if (sc ==
37198 # 5628 "ssl/ssl_lib.c" 3 4
37199 ((void *)0)
37200 # 5628 "ssl/ssl_lib.c"
37201 )
37202 return;
37203
37204 sc->psk_use_session_cb = cb;
37205 }
37206
37207 void SSL_CTX_set_psk_use_session_callback(SSL_CTX *ctx,
37208 SSL_psk_use_session_cb_func cb)
37209 {
37210 ctx->psk_use_session_cb = cb;
37211 }
37212
37213 void SSL_CTX_set_msg_callback(SSL_CTX *ctx,
37214 void (*cb) (int write_p, int version,
37215 int content_type, const void *buf,
37216 size_t len, SSL *ssl, void *arg))
37217 {
37218 SSL_CTX_callback_ctrl(ctx, 15, (void (*)(void))cb);
37219 }
37220
37221 void SSL_set_msg_callback(SSL *ssl,
37222 void (*cb) (int write_p, int version,
37223 int content_type, const void *buf,
37224 size_t len, SSL *ssl, void *arg))
37225 {
37226 SSL_callback_ctrl(ssl, 15, (void (*)(void))cb);
37227 }
37228
37229 void SSL_CTX_set_not_resumable_session_callback(SSL_CTX *ctx,
37230 int (*cb) (SSL *ssl,
37231 int
37232 is_forward_secure))
37233 {
37234 SSL_CTX_callback_ctrl(ctx, 79,
37235 (void (*)(void))cb);
37236 }
37237
37238 void SSL_set_not_resumable_session_callback(SSL *ssl,
37239 int (*cb) (SSL *ssl,
37240 int is_forward_secure))
37241 {
37242 SSL_callback_ctrl(ssl, 79,
37243 (void (*)(void))cb);
37244 }
37245
37246 void SSL_CTX_set_record_padding_callback(SSL_CTX *ctx,
37247 size_t (*cb) (SSL *ssl, int type,
37248 size_t len, void *arg))
37249 {
37250 ctx->record_padding_cb = cb;
37251 }
37252
37253 void SSL_CTX_set_record_padding_callback_arg(SSL_CTX *ctx, void *arg)
37254 {
37255 ctx->record_padding_arg = arg;
37256 }
37257
37258 void *SSL_CTX_get_record_padding_callback_arg(const SSL_CTX *ctx)
37259 {
37260 return ctx->record_padding_arg;
37261 }
37262
37263 int SSL_CTX_set_block_padding(SSL_CTX *ctx, size_t block_size)
37264 {
37265 if ((((ctx)->method) == OSSL_QUIC_client_method() || ((ctx)->method) == OSSL_QUIC_client_thread_method()) && block_size > 1)
37266 return 0;
37267
37268
37269 if (block_size == 1)
37270 ctx->block_padding = 0;
37271 else if (block_size <= 16384)
37272 ctx->block_padding = block_size;
37273 else
37274 return 0;
37275 return 1;
37276 }
37277
37278 int SSL_set_record_padding_callback(SSL *ssl,
37279 size_t (*cb) (SSL *ssl, int type,
37280 size_t len, void *arg))
37281 {
37282 BIO *b;
37283 SSL_CONNECTION *sc = ((ssl) ==
37284 # 5710 "ssl/ssl_lib.c" 3 4
37285 ((void *)0)
37286 # 5710 "ssl/ssl_lib.c"
37287 ?
37288 # 5710 "ssl/ssl_lib.c" 3 4
37289 ((void *)0)
37290 # 5710 "ssl/ssl_lib.c"
37291 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) :
37292 # 5710 "ssl/ssl_lib.c" 3 4
37293 ((void *)0)
37294 # 5710 "ssl/ssl_lib.c"
37295 ));
37296
37297 if (sc ==
37298 # 5712 "ssl/ssl_lib.c" 3 4
37299 ((void *)0)
37300 # 5712 "ssl/ssl_lib.c"
37301 )
37302 return 0;
37303
37304 b = SSL_get_wbio(ssl);
37305 if (b ==
37306 # 5716 "ssl/ssl_lib.c" 3 4
37307 ((void *)0)
37308 # 5716 "ssl/ssl_lib.c"
37309 || !(0)) {
37310 sc->rlayer.record_padding_cb = cb;
37311 return 1;
37312 }
37313 return 0;
37314 }
37315
37316 void SSL_set_record_padding_callback_arg(SSL *ssl, void *arg)
37317 {
37318 SSL_CONNECTION *sc = ((ssl) ==
37319 # 5725 "ssl/ssl_lib.c" 3 4
37320 ((void *)0)
37321 # 5725 "ssl/ssl_lib.c"
37322 ?
37323 # 5725 "ssl/ssl_lib.c" 3 4
37324 ((void *)0)
37325 # 5725 "ssl/ssl_lib.c"
37326 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls :
37327 # 5725 "ssl/ssl_lib.c" 3 4
37328 ((void *)0)
37329 # 5725 "ssl/ssl_lib.c"
37330 )));
37331
37332 if (sc ==
37333 # 5727 "ssl/ssl_lib.c" 3 4
37334 ((void *)0)
37335 # 5727 "ssl/ssl_lib.c"
37336 )
37337 return;
37338
37339 sc->rlayer.record_padding_arg = arg;
37340 }
37341
37342 void *SSL_get_record_padding_callback_arg(const SSL *ssl)
37343 {
37344 const SSL_CONNECTION *sc = ((ssl) ==
37345 # 5735 "ssl/ssl_lib.c" 3 4
37346 ((void *)0)
37347 # 5735 "ssl/ssl_lib.c"
37348 ?
37349 # 5735 "ssl/ssl_lib.c" 3 4
37350 ((void *)0)
37351 # 5735 "ssl/ssl_lib.c"
37352 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls :
37353 # 5735 "ssl/ssl_lib.c" 3 4
37354 ((void *)0)
37355 # 5735 "ssl/ssl_lib.c"
37356 )));
37357
37358 if (sc ==
37359 # 5737 "ssl/ssl_lib.c" 3 4
37360 ((void *)0)
37361 # 5737 "ssl/ssl_lib.c"
37362 )
37363 return
37364 # 5738 "ssl/ssl_lib.c" 3 4
37365 ((void *)0)
37366 # 5738 "ssl/ssl_lib.c"
37367 ;
37368
37369 return sc->rlayer.record_padding_arg;
37370 }
37371
37372 int SSL_set_block_padding(SSL *ssl, size_t block_size)
37373 {
37374 SSL_CONNECTION *sc = ((ssl) ==
37375 # 5745 "ssl/ssl_lib.c" 3 4
37376 ((void *)0)
37377 # 5745 "ssl/ssl_lib.c"
37378 ?
37379 # 5745 "ssl/ssl_lib.c" 3 4
37380 ((void *)0)
37381 # 5745 "ssl/ssl_lib.c"
37382 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls :
37383 # 5745 "ssl/ssl_lib.c" 3 4
37384 ((void *)0)
37385 # 5745 "ssl/ssl_lib.c"
37386 )));
37387
37388 if (sc ==
37389 # 5747 "ssl/ssl_lib.c" 3 4
37390 ((void *)0)
37391 # 5747 "ssl/ssl_lib.c"
37392 || (((ssl) !=
37393 # 5747 "ssl/ssl_lib.c" 3 4
37394 ((void *)0)
37395 # 5747 "ssl/ssl_lib.c"
37396 && ((ssl)->type == 1 || (ssl)->type == 2)) && block_size > 1))
37397 return 0;
37398
37399
37400 if (block_size == 1)
37401 sc->rlayer.block_padding = 0;
37402 else if (block_size <= 16384)
37403 sc->rlayer.block_padding = block_size;
37404 else
37405 return 0;
37406 return 1;
37407 }
37408
37409 int SSL_set_num_tickets(SSL *s, size_t num_tickets)
37410 {
37411 SSL_CONNECTION *sc = ((s) ==
37412 # 5762 "ssl/ssl_lib.c" 3 4
37413 ((void *)0)
37414 # 5762 "ssl/ssl_lib.c"
37415 ?
37416 # 5762 "ssl/ssl_lib.c" 3 4
37417 ((void *)0)
37418 # 5762 "ssl/ssl_lib.c"
37419 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
37420 # 5762 "ssl/ssl_lib.c" 3 4
37421 ((void *)0)
37422 # 5762 "ssl/ssl_lib.c"
37423 )));
37424
37425 if (sc ==
37426 # 5764 "ssl/ssl_lib.c" 3 4
37427 ((void *)0)
37428 # 5764 "ssl/ssl_lib.c"
37429 )
37430 return 0;
37431
37432 sc->num_tickets = num_tickets;
37433
37434 return 1;
37435 }
37436
37437 size_t SSL_get_num_tickets(const SSL *s)
37438 {
37439 const SSL_CONNECTION *sc = ((s) ==
37440 # 5774 "ssl/ssl_lib.c" 3 4
37441 ((void *)0)
37442 # 5774 "ssl/ssl_lib.c"
37443 ?
37444 # 5774 "ssl/ssl_lib.c" 3 4
37445 ((void *)0)
37446 # 5774 "ssl/ssl_lib.c"
37447 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
37448 # 5774 "ssl/ssl_lib.c" 3 4
37449 ((void *)0)
37450 # 5774 "ssl/ssl_lib.c"
37451 )));
37452
37453 if (sc ==
37454 # 5776 "ssl/ssl_lib.c" 3 4
37455 ((void *)0)
37456 # 5776 "ssl/ssl_lib.c"
37457 )
37458 return 0;
37459
37460 return sc->num_tickets;
37461 }
37462
37463 int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets)
37464 {
37465 ctx->num_tickets = num_tickets;
37466
37467 return 1;
37468 }
37469
37470 size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx)
37471 {
37472 return ctx->num_tickets;
37473 }
37474
37475
37476 int ssl_handshake_hash(SSL_CONNECTION *s,
37477 unsigned char *out, size_t outlen,
37478 size_t *hashlen)
37479 {
37480 EVP_MD_CTX *ctx =
37481 # 5799 "ssl/ssl_lib.c" 3 4
37482 ((void *)0)
37483 # 5799 "ssl/ssl_lib.c"
37484 ;
37485 EVP_MD_CTX *hdgst = s->s3.handshake_dgst;
37486 int hashleni = EVP_MD_get_size(EVP_MD_CTX_get0_md(hdgst));
37487 int ret = 0;
37488
37489 if (hashleni < 0 || (size_t)hashleni > outlen) {
37490 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 5805, __func__), ossl_statem_fatal)((s), (80), ((259|((0x1 << 18L)|(0x2 << 18L)))),
37491 # 5805 "ssl/ssl_lib.c" 3 4
37492 ((void *)0)
37493 # 5805 "ssl/ssl_lib.c"
37494 );
37495 goto err;
37496 }
37497
37498 ctx = EVP_MD_CTX_new();
37499 if (ctx ==
37500 # 5810 "ssl/ssl_lib.c" 3 4
37501 ((void *)0)
37502 # 5810 "ssl/ssl_lib.c"
37503 ) {
37504 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 5811, __func__), ossl_statem_fatal)((s), (80), ((259|((0x1 << 18L)|(0x2 << 18L)))),
37505 # 5811 "ssl/ssl_lib.c" 3 4
37506 ((void *)0)
37507 # 5811 "ssl/ssl_lib.c"
37508 );
37509 goto err;
37510 }
37511
37512 if (!EVP_MD_CTX_copy_ex(ctx, hdgst)
37513 || EVP_DigestFinal_ex(ctx, out,
37514 # 5816 "ssl/ssl_lib.c" 3 4
37515 ((void *)0)
37516 # 5816 "ssl/ssl_lib.c"
37517 ) <= 0) {
37518 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 5817, __func__), ossl_statem_fatal)((s), (80), ((259|((0x1 << 18L)|(0x2 << 18L)))),
37519 # 5817 "ssl/ssl_lib.c" 3 4
37520 ((void *)0)
37521 # 5817 "ssl/ssl_lib.c"
37522 );
37523 goto err;
37524 }
37525
37526 *hashlen = hashleni;
37527
37528 ret = 1;
37529 err:
37530 EVP_MD_CTX_free(ctx);
37531 return ret;
37532 }
37533
37534 int SSL_session_reused(const SSL *s)
37535 {
37536 const SSL_CONNECTION *sc = ((s) ==
37537 # 5831 "ssl/ssl_lib.c" 3 4
37538 ((void *)0)
37539 # 5831 "ssl/ssl_lib.c"
37540 ?
37541 # 5831 "ssl/ssl_lib.c" 3 4
37542 ((void *)0)
37543 # 5831 "ssl/ssl_lib.c"
37544 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
37545 # 5831 "ssl/ssl_lib.c" 3 4
37546 ((void *)0)
37547 # 5831 "ssl/ssl_lib.c"
37548 )));
37549
37550 if (sc ==
37551 # 5833 "ssl/ssl_lib.c" 3 4
37552 ((void *)0)
37553 # 5833 "ssl/ssl_lib.c"
37554 )
37555 return 0;
37556
37557 return sc->hit;
37558 }
37559
37560 int SSL_is_server(const SSL *s)
37561 {
37562 const SSL_CONNECTION *sc = ((s) ==
37563 # 5841 "ssl/ssl_lib.c" 3 4
37564 ((void *)0)
37565 # 5841 "ssl/ssl_lib.c"
37566 ?
37567 # 5841 "ssl/ssl_lib.c" 3 4
37568 ((void *)0)
37569 # 5841 "ssl/ssl_lib.c"
37570 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
37571 # 5841 "ssl/ssl_lib.c" 3 4
37572 ((void *)0)
37573 # 5841 "ssl/ssl_lib.c"
37574 )));
37575
37576 if (sc ==
37577 # 5843 "ssl/ssl_lib.c" 3 4
37578 ((void *)0)
37579 # 5843 "ssl/ssl_lib.c"
37580 )
37581 return 0;
37582
37583 return sc->server;
37584 }
37585
37586
37587 void SSL_set_debug(SSL *s, int debug)
37588 {
37589
37590 (void)s;
37591 (void)debug;
37592 }
37593
37594
37595 void SSL_set_security_level(SSL *s, int level)
37596 {
37597 SSL_CONNECTION *sc = ((s) ==
37598 # 5860 "ssl/ssl_lib.c" 3 4
37599 ((void *)0)
37600 # 5860 "ssl/ssl_lib.c"
37601 ?
37602 # 5860 "ssl/ssl_lib.c" 3 4
37603 ((void *)0)
37604 # 5860 "ssl/ssl_lib.c"
37605 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
37606 # 5860 "ssl/ssl_lib.c" 3 4
37607 ((void *)0)
37608 # 5860 "ssl/ssl_lib.c"
37609 )));
37610
37611 if (sc ==
37612 # 5862 "ssl/ssl_lib.c" 3 4
37613 ((void *)0)
37614 # 5862 "ssl/ssl_lib.c"
37615 )
37616 return;
37617
37618 sc->cert->sec_level = level;
37619 }
37620
37621 int SSL_get_security_level(const SSL *s)
37622 {
37623 const SSL_CONNECTION *sc = ((s) ==
37624 # 5870 "ssl/ssl_lib.c" 3 4
37625 ((void *)0)
37626 # 5870 "ssl/ssl_lib.c"
37627 ?
37628 # 5870 "ssl/ssl_lib.c" 3 4
37629 ((void *)0)
37630 # 5870 "ssl/ssl_lib.c"
37631 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
37632 # 5870 "ssl/ssl_lib.c" 3 4
37633 ((void *)0)
37634 # 5870 "ssl/ssl_lib.c"
37635 )));
37636
37637 if (sc ==
37638 # 5872 "ssl/ssl_lib.c" 3 4
37639 ((void *)0)
37640 # 5872 "ssl/ssl_lib.c"
37641 )
37642 return 0;
37643
37644 return sc->cert->sec_level;
37645 }
37646
37647 void SSL_set_security_callback(SSL *s,
37648 int (*cb) (const SSL *s, const SSL_CTX *ctx,
37649 int op, int bits, int nid,
37650 void *other, void *ex))
37651 {
37652 SSL_CONNECTION *sc = ((s) ==
37653 # 5883 "ssl/ssl_lib.c" 3 4
37654 ((void *)0)
37655 # 5883 "ssl/ssl_lib.c"
37656 ?
37657 # 5883 "ssl/ssl_lib.c" 3 4
37658 ((void *)0)
37659 # 5883 "ssl/ssl_lib.c"
37660 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
37661 # 5883 "ssl/ssl_lib.c" 3 4
37662 ((void *)0)
37663 # 5883 "ssl/ssl_lib.c"
37664 )));
37665
37666 if (sc ==
37667 # 5885 "ssl/ssl_lib.c" 3 4
37668 ((void *)0)
37669 # 5885 "ssl/ssl_lib.c"
37670 )
37671 return;
37672
37673 sc->cert->sec_cb = cb;
37674 }
37675
37676 int (*SSL_get_security_callback(const SSL *s)) (const SSL *s,
37677 const SSL_CTX *ctx, int op,
37678 int bits, int nid, void *other,
37679 void *ex) {
37680 const SSL_CONNECTION *sc = ((s) ==
37681 # 5895 "ssl/ssl_lib.c" 3 4
37682 ((void *)0)
37683 # 5895 "ssl/ssl_lib.c"
37684 ?
37685 # 5895 "ssl/ssl_lib.c" 3 4
37686 ((void *)0)
37687 # 5895 "ssl/ssl_lib.c"
37688 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
37689 # 5895 "ssl/ssl_lib.c" 3 4
37690 ((void *)0)
37691 # 5895 "ssl/ssl_lib.c"
37692 )));
37693
37694 if (sc ==
37695 # 5897 "ssl/ssl_lib.c" 3 4
37696 ((void *)0)
37697 # 5897 "ssl/ssl_lib.c"
37698 )
37699 return
37700 # 5898 "ssl/ssl_lib.c" 3 4
37701 ((void *)0)
37702 # 5898 "ssl/ssl_lib.c"
37703 ;
37704
37705 return sc->cert->sec_cb;
37706 }
37707
37708 void SSL_set0_security_ex_data(SSL *s, void *ex)
37709 {
37710 SSL_CONNECTION *sc = ((s) ==
37711 # 5905 "ssl/ssl_lib.c" 3 4
37712 ((void *)0)
37713 # 5905 "ssl/ssl_lib.c"
37714 ?
37715 # 5905 "ssl/ssl_lib.c" 3 4
37716 ((void *)0)
37717 # 5905 "ssl/ssl_lib.c"
37718 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
37719 # 5905 "ssl/ssl_lib.c" 3 4
37720 ((void *)0)
37721 # 5905 "ssl/ssl_lib.c"
37722 )));
37723
37724 if (sc ==
37725 # 5907 "ssl/ssl_lib.c" 3 4
37726 ((void *)0)
37727 # 5907 "ssl/ssl_lib.c"
37728 )
37729 return;
37730
37731 sc->cert->sec_ex = ex;
37732 }
37733
37734 void *SSL_get0_security_ex_data(const SSL *s)
37735 {
37736 const SSL_CONNECTION *sc = ((s) ==
37737 # 5915 "ssl/ssl_lib.c" 3 4
37738 ((void *)0)
37739 # 5915 "ssl/ssl_lib.c"
37740 ?
37741 # 5915 "ssl/ssl_lib.c" 3 4
37742 ((void *)0)
37743 # 5915 "ssl/ssl_lib.c"
37744 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
37745 # 5915 "ssl/ssl_lib.c" 3 4
37746 ((void *)0)
37747 # 5915 "ssl/ssl_lib.c"
37748 )));
37749
37750 if (sc ==
37751 # 5917 "ssl/ssl_lib.c" 3 4
37752 ((void *)0)
37753 # 5917 "ssl/ssl_lib.c"
37754 )
37755 return
37756 # 5918 "ssl/ssl_lib.c" 3 4
37757 ((void *)0)
37758 # 5918 "ssl/ssl_lib.c"
37759 ;
37760
37761 return sc->cert->sec_ex;
37762 }
37763
37764 void SSL_CTX_set_security_level(SSL_CTX *ctx, int level)
37765 {
37766 ctx->cert->sec_level = level;
37767 }
37768
37769 int SSL_CTX_get_security_level(const SSL_CTX *ctx)
37770 {
37771 return ctx->cert->sec_level;
37772 }
37773
37774 void SSL_CTX_set_security_callback(SSL_CTX *ctx,
37775 int (*cb) (const SSL *s, const SSL_CTX *ctx,
37776 int op, int bits, int nid,
37777 void *other, void *ex))
37778 {
37779 ctx->cert->sec_cb = cb;
37780 }
37781
37782 int (*SSL_CTX_get_security_callback(const SSL_CTX *ctx)) (const SSL *s,
37783 const SSL_CTX *ctx,
37784 int op, int bits,
37785 int nid,
37786 void *other,
37787 void *ex) {
37788 return ctx->cert->sec_cb;
37789 }
37790
37791 void SSL_CTX_set0_security_ex_data(SSL_CTX *ctx, void *ex)
37792 {
37793 ctx->cert->sec_ex = ex;
37794 }
37795
37796 void *SSL_CTX_get0_security_ex_data(const SSL_CTX *ctx)
37797 {
37798 return ctx->cert->sec_ex;
37799 }
37800
37801 uint64_t SSL_CTX_get_options(const SSL_CTX *ctx)
37802 {
37803 return ctx->options;
37804 }
37805
37806 uint64_t SSL_get_options(const SSL *s)
37807 {
37808 const SSL_CONNECTION *sc = ((s) ==
37809 # 5967 "ssl/ssl_lib.c" 3 4
37810 ((void *)0)
37811 # 5967 "ssl/ssl_lib.c"
37812 ?
37813 # 5967 "ssl/ssl_lib.c" 3 4
37814 ((void *)0)
37815 # 5967 "ssl/ssl_lib.c"
37816 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
37817 # 5967 "ssl/ssl_lib.c" 3 4
37818 ((void *)0)
37819 # 5967 "ssl/ssl_lib.c"
37820 )));
37821
37822
37823 if (((s) !=
37824 # 5970 "ssl/ssl_lib.c" 3 4
37825 ((void *)0)
37826 # 5970 "ssl/ssl_lib.c"
37827 && ((s)->type == 1 || (s)->type == 2)))
37828 return ossl_quic_get_options(s);
37829
37830
37831 if (sc ==
37832 # 5974 "ssl/ssl_lib.c" 3 4
37833 ((void *)0)
37834 # 5974 "ssl/ssl_lib.c"
37835 )
37836 return 0;
37837
37838 return sc->options;
37839 }
37840
37841 uint64_t SSL_CTX_set_options(SSL_CTX *ctx, uint64_t op)
37842 {
37843 return ctx->options |= op;
37844 }
37845
37846 uint64_t SSL_set_options(SSL *s, uint64_t op)
37847 {
37848 SSL_CONNECTION *sc;
37849 OSSL_PARAM options[2], *opts = options;
37850
37851
37852 if (((s) !=
37853 # 5991 "ssl/ssl_lib.c" 3 4
37854 ((void *)0)
37855 # 5991 "ssl/ssl_lib.c"
37856 && ((s)->type == 1 || (s)->type == 2)))
37857 return ossl_quic_set_options(s, op);
37858
37859
37860 sc = ((s) ==
37861 # 5995 "ssl/ssl_lib.c" 3 4
37862 ((void *)0)
37863 # 5995 "ssl/ssl_lib.c"
37864 ?
37865 # 5995 "ssl/ssl_lib.c" 3 4
37866 ((void *)0)
37867 # 5995 "ssl/ssl_lib.c"
37868 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
37869 # 5995 "ssl/ssl_lib.c" 3 4
37870 ((void *)0)
37871 # 5995 "ssl/ssl_lib.c"
37872 )));
37873 if (sc ==
37874 # 5996 "ssl/ssl_lib.c" 3 4
37875 ((void *)0)
37876 # 5996 "ssl/ssl_lib.c"
37877 )
37878 return 0;
37879
37880 sc->options |= op;
37881
37882 *opts++ = OSSL_PARAM_construct_uint64("options",
37883 &sc->options);
37884 *opts = OSSL_PARAM_construct_end();
37885
37886
37887 sc->rlayer.rrlmethod->set_options(sc->rlayer.rrl, options);
37888 sc->rlayer.wrlmethod->set_options(sc->rlayer.wrl, options);
37889
37890 return sc->options;
37891 }
37892
37893 uint64_t SSL_CTX_clear_options(SSL_CTX *ctx, uint64_t op)
37894 {
37895 return ctx->options &= ~op;
37896 }
37897
37898 uint64_t SSL_clear_options(SSL *s, uint64_t op)
37899 {
37900 SSL_CONNECTION *sc = ((s) ==
37901 # 6019 "ssl/ssl_lib.c" 3 4
37902 ((void *)0)
37903 # 6019 "ssl/ssl_lib.c"
37904 ?
37905 # 6019 "ssl/ssl_lib.c" 3 4
37906 ((void *)0)
37907 # 6019 "ssl/ssl_lib.c"
37908 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
37909 # 6019 "ssl/ssl_lib.c" 3 4
37910 ((void *)0)
37911 # 6019 "ssl/ssl_lib.c"
37912 )));
37913 OSSL_PARAM options[2], *opts = options;
37914
37915
37916 if (((s) !=
37917 # 6023 "ssl/ssl_lib.c" 3 4
37918 ((void *)0)
37919 # 6023 "ssl/ssl_lib.c"
37920 && ((s)->type == 1 || (s)->type == 2)))
37921 return ossl_quic_clear_options(s, op);
37922
37923
37924 if (sc ==
37925 # 6027 "ssl/ssl_lib.c" 3 4
37926 ((void *)0)
37927 # 6027 "ssl/ssl_lib.c"
37928 )
37929 return 0;
37930
37931 sc->options &= ~op;
37932
37933 *opts++ = OSSL_PARAM_construct_uint64("options",
37934 &sc->options);
37935 *opts = OSSL_PARAM_construct_end();
37936
37937
37938 sc->rlayer.rrlmethod->set_options(sc->rlayer.rrl, options);
37939 sc->rlayer.wrlmethod->set_options(sc->rlayer.wrl, options);
37940
37941 return sc->options;
37942 }
37943
37944 struct stack_st_X509 *SSL_get0_verified_chain(const SSL *s)
37945 {
37946 const SSL_CONNECTION *sc = ((s) ==
37947 # 6045 "ssl/ssl_lib.c" 3 4
37948 ((void *)0)
37949 # 6045 "ssl/ssl_lib.c"
37950 ?
37951 # 6045 "ssl/ssl_lib.c" 3 4
37952 ((void *)0)
37953 # 6045 "ssl/ssl_lib.c"
37954 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
37955 # 6045 "ssl/ssl_lib.c" 3 4
37956 ((void *)0)
37957 # 6045 "ssl/ssl_lib.c"
37958 )));
37959
37960 if (sc ==
37961 # 6047 "ssl/ssl_lib.c" 3 4
37962 ((void *)0)
37963 # 6047 "ssl/ssl_lib.c"
37964 )
37965 return
37966 # 6048 "ssl/ssl_lib.c" 3 4
37967 ((void *)0)
37968 # 6048 "ssl/ssl_lib.c"
37969 ;
37970
37971 return sc->verified_chain;
37972 }
37973
37974 static int ssl_cipher_id_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) { SSL_CIPHER const *a = a_; SSL_CIPHER const *b = b_; return ssl_cipher_id_cmp(a,b); } SSL_CIPHER *OBJ_bsearch_ssl_cipher_id(SSL_CIPHER *key, SSL_CIPHER const *base, int num) { return (SSL_CIPHER *)OBJ_bsearch_(key, base, num, sizeof(SSL_CIPHER), ssl_cipher_id_cmp_BSEARCH_CMP_FN); } extern void dummy_prototype(void);
37975 # 6066 "ssl/ssl_lib.c"
37976 static int ct_move_scts(struct stack_st_SCT **dst, struct stack_st_SCT *src,
37977 sct_source_t origin)
37978 {
37979 int scts_moved = 0;
37980 SCT *sct =
37981 # 6070 "ssl/ssl_lib.c" 3 4
37982 ((void *)0)
37983 # 6070 "ssl/ssl_lib.c"
37984 ;
37985
37986 if (*dst ==
37987 # 6072 "ssl/ssl_lib.c" 3 4
37988 ((void *)0)
37989 # 6072 "ssl/ssl_lib.c"
37990 ) {
37991 *dst = ((struct stack_st_SCT *)OPENSSL_sk_new_null());
37992 if (*dst ==
37993 # 6074 "ssl/ssl_lib.c" 3 4
37994 ((void *)0)
37995 # 6074 "ssl/ssl_lib.c"
37996 ) {
37997 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6075,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
37998 # 6075 "ssl/ssl_lib.c" 3 4
37999 ((void *)0)
38000 # 6075 "ssl/ssl_lib.c"
38001 );
38002 goto err;
38003 }
38004 }
38005
38006 while ((sct = ((SCT *)OPENSSL_sk_pop(ossl_check_SCT_sk_type(src)))) !=
38007 # 6080 "ssl/ssl_lib.c" 3 4
38008 ((void *)0)
38009 # 6080 "ssl/ssl_lib.c"
38010 ) {
38011 if (SCT_set_source(sct, origin) != 1)
38012 goto err;
38013
38014 if (!OPENSSL_sk_push(ossl_check_SCT_sk_type(*dst), ossl_check_SCT_type(sct)))
38015 goto err;
38016 scts_moved += 1;
38017 }
38018
38019 return scts_moved;
38020 err:
38021 SCT_free(sct);
38022 return -1;
38023 }
38024
38025
38026
38027
38028
38029 static int ct_extract_tls_extension_scts(SSL_CONNECTION *s)
38030 {
38031 int scts_extracted = 0;
38032
38033 if (s->ext.scts !=
38034 # 6103 "ssl/ssl_lib.c" 3 4
38035 ((void *)0)
38036 # 6103 "ssl/ssl_lib.c"
38037 ) {
38038 const unsigned char *p = s->ext.scts;
38039 struct stack_st_SCT *scts = o2i_SCT_LIST(
38040 # 6105 "ssl/ssl_lib.c" 3 4
38041 ((void *)0)
38042 # 6105 "ssl/ssl_lib.c"
38043 , &p, s->ext.scts_len);
38044
38045 scts_extracted = ct_move_scts(&s->scts, scts, SCT_SOURCE_TLS_EXTENSION);
38046
38047 SCT_LIST_free(scts);
38048 }
38049
38050 return scts_extracted;
38051 }
38052 # 6123 "ssl/ssl_lib.c"
38053 static int ct_extract_ocsp_response_scts(SSL_CONNECTION *s)
38054 {
38055
38056 int scts_extracted = 0;
38057 const unsigned char *p;
38058 OCSP_BASICRESP *br =
38059 # 6128 "ssl/ssl_lib.c" 3 4
38060 ((void *)0)
38061 # 6128 "ssl/ssl_lib.c"
38062 ;
38063 OCSP_RESPONSE *rsp =
38064 # 6129 "ssl/ssl_lib.c" 3 4
38065 ((void *)0)
38066 # 6129 "ssl/ssl_lib.c"
38067 ;
38068 struct stack_st_SCT *scts =
38069 # 6130 "ssl/ssl_lib.c" 3 4
38070 ((void *)0)
38071 # 6130 "ssl/ssl_lib.c"
38072 ;
38073 int i;
38074
38075 if (s->ext.ocsp.resp ==
38076 # 6133 "ssl/ssl_lib.c" 3 4
38077 ((void *)0)
38078 # 6133 "ssl/ssl_lib.c"
38079 || s->ext.ocsp.resp_len == 0)
38080 goto err;
38081
38082 p = s->ext.ocsp.resp;
38083 rsp = d2i_OCSP_RESPONSE(
38084 # 6137 "ssl/ssl_lib.c" 3 4
38085 ((void *)0)
38086 # 6137 "ssl/ssl_lib.c"
38087 , &p, (int)s->ext.ocsp.resp_len);
38088 if (rsp ==
38089 # 6138 "ssl/ssl_lib.c" 3 4
38090 ((void *)0)
38091 # 6138 "ssl/ssl_lib.c"
38092 )
38093 goto err;
38094
38095 br = OCSP_response_get1_basic(rsp);
38096 if (br ==
38097 # 6142 "ssl/ssl_lib.c" 3 4
38098 ((void *)0)
38099 # 6142 "ssl/ssl_lib.c"
38100 )
38101 goto err;
38102
38103 for (i = 0; i < OCSP_resp_count(br); ++i) {
38104 OCSP_SINGLERESP *single = OCSP_resp_get0(br, i);
38105
38106 if (single ==
38107 # 6148 "ssl/ssl_lib.c" 3 4
38108 ((void *)0)
38109 # 6148 "ssl/ssl_lib.c"
38110 )
38111 continue;
38112
38113 scts =
38114 OCSP_SINGLERESP_get1_ext_d2i(single, 954,
38115 # 6152 "ssl/ssl_lib.c" 3 4
38116 ((void *)0)
38117 # 6152 "ssl/ssl_lib.c"
38118 ,
38119 # 6152 "ssl/ssl_lib.c" 3 4
38120 ((void *)0)
38121 # 6152 "ssl/ssl_lib.c"
38122 );
38123 scts_extracted =
38124 ct_move_scts(&s->scts, scts, SCT_SOURCE_OCSP_STAPLED_RESPONSE);
38125 if (scts_extracted < 0)
38126 goto err;
38127 }
38128 err:
38129 SCT_LIST_free(scts);
38130 OCSP_BASICRESP_free(br);
38131 OCSP_RESPONSE_free(rsp);
38132 return scts_extracted;
38133
38134
38135
38136
38137 }
38138
38139
38140
38141
38142
38143
38144 static int ct_extract_x509v3_extension_scts(SSL_CONNECTION *s)
38145 {
38146 int scts_extracted = 0;
38147 X509 *cert = s->session !=
38148 # 6177 "ssl/ssl_lib.c" 3 4
38149 ((void *)0)
38150 # 6177 "ssl/ssl_lib.c"
38151 ? s->session->peer :
38152 # 6177 "ssl/ssl_lib.c" 3 4
38153 ((void *)0)
38154 # 6177 "ssl/ssl_lib.c"
38155 ;
38156
38157 if (cert !=
38158 # 6179 "ssl/ssl_lib.c" 3 4
38159 ((void *)0)
38160 # 6179 "ssl/ssl_lib.c"
38161 ) {
38162 struct stack_st_SCT *scts =
38163 X509_get_ext_d2i(cert, 951,
38164 # 6181 "ssl/ssl_lib.c" 3 4
38165 ((void *)0)
38166 # 6181 "ssl/ssl_lib.c"
38167 ,
38168 # 6181 "ssl/ssl_lib.c" 3 4
38169 ((void *)0)
38170 # 6181 "ssl/ssl_lib.c"
38171 );
38172
38173 scts_extracted =
38174 ct_move_scts(&s->scts, scts, SCT_SOURCE_X509V3_EXTENSION);
38175
38176 SCT_LIST_free(scts);
38177 }
38178
38179 return scts_extracted;
38180 }
38181
38182
38183
38184
38185
38186
38187 const struct stack_st_SCT *SSL_get0_peer_scts(SSL *s)
38188 {
38189 SSL_CONNECTION *sc = ((s) ==
38190 # 6199 "ssl/ssl_lib.c" 3 4
38191 ((void *)0)
38192 # 6199 "ssl/ssl_lib.c"
38193 ?
38194 # 6199 "ssl/ssl_lib.c" 3 4
38195 ((void *)0)
38196 # 6199 "ssl/ssl_lib.c"
38197 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
38198 # 6199 "ssl/ssl_lib.c" 3 4
38199 ((void *)0)
38200 # 6199 "ssl/ssl_lib.c"
38201 )));
38202
38203 if (sc ==
38204 # 6201 "ssl/ssl_lib.c" 3 4
38205 ((void *)0)
38206 # 6201 "ssl/ssl_lib.c"
38207 )
38208 return
38209 # 6202 "ssl/ssl_lib.c" 3 4
38210 ((void *)0)
38211 # 6202 "ssl/ssl_lib.c"
38212 ;
38213
38214 if (!sc->scts_parsed) {
38215 if (ct_extract_tls_extension_scts(sc) < 0 ||
38216 ct_extract_ocsp_response_scts(sc) < 0 ||
38217 ct_extract_x509v3_extension_scts(sc) < 0)
38218 goto err;
38219
38220 sc->scts_parsed = 1;
38221 }
38222 return sc->scts;
38223 err:
38224 return
38225 # 6214 "ssl/ssl_lib.c" 3 4
38226 ((void *)0)
38227 # 6214 "ssl/ssl_lib.c"
38228 ;
38229 }
38230
38231 static int ct_permissive(const CT_POLICY_EVAL_CTX *ctx,
38232 const struct stack_st_SCT *scts, void *unused_arg)
38233 {
38234 return 1;
38235 }
38236
38237 static int ct_strict(const CT_POLICY_EVAL_CTX *ctx,
38238 const struct stack_st_SCT *scts, void *unused_arg)
38239 {
38240 int count = scts !=
38241 # 6226 "ssl/ssl_lib.c" 3 4
38242 ((void *)0)
38243 # 6226 "ssl/ssl_lib.c"
38244 ? OPENSSL_sk_num(ossl_check_const_SCT_sk_type(scts)) : 0;
38245 int i;
38246
38247 for (i = 0; i < count; ++i) {
38248 SCT *sct = ((SCT *)OPENSSL_sk_value(ossl_check_const_SCT_sk_type(scts), (i)));
38249 int status = SCT_get_validation_status(sct);
38250
38251 if (status == SCT_VALIDATION_STATUS_VALID)
38252 return 1;
38253 }
38254 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6236,__func__), ERR_set_error)((20),(216),
38255 # 6236 "ssl/ssl_lib.c" 3 4
38256 ((void *)0)
38257 # 6236 "ssl/ssl_lib.c"
38258 );
38259 return 0;
38260 }
38261
38262 int SSL_set_ct_validation_callback(SSL *s, ssl_ct_validation_cb callback,
38263 void *arg)
38264 {
38265 SSL_CONNECTION *sc = ((s) ==
38266 # 6243 "ssl/ssl_lib.c" 3 4
38267 ((void *)0)
38268 # 6243 "ssl/ssl_lib.c"
38269 ?
38270 # 6243 "ssl/ssl_lib.c" 3 4
38271 ((void *)0)
38272 # 6243 "ssl/ssl_lib.c"
38273 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
38274 # 6243 "ssl/ssl_lib.c" 3 4
38275 ((void *)0)
38276 # 6243 "ssl/ssl_lib.c"
38277 )));
38278
38279 if (sc ==
38280 # 6245 "ssl/ssl_lib.c" 3 4
38281 ((void *)0)
38282 # 6245 "ssl/ssl_lib.c"
38283 )
38284 return 0;
38285
38286
38287
38288
38289
38290 if (callback !=
38291 # 6252 "ssl/ssl_lib.c" 3 4
38292 ((void *)0)
38293 # 6252 "ssl/ssl_lib.c"
38294 && SSL_CTX_has_client_custom_ext(s->ctx,
38295 18))
38296 {
38297 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6255,__func__), ERR_set_error)((20),(206),
38298 # 6255 "ssl/ssl_lib.c" 3 4
38299 ((void *)0)
38300 # 6255 "ssl/ssl_lib.c"
38301 );
38302 return 0;
38303 }
38304
38305 if (callback !=
38306 # 6259 "ssl/ssl_lib.c" 3 4
38307 ((void *)0)
38308 # 6259 "ssl/ssl_lib.c"
38309 ) {
38310
38311
38312
38313 if (!SSL_ctrl(s,65,1,
38314 # 6263 "ssl/ssl_lib.c" 3 4
38315 ((void *)0)
38316 # 6263 "ssl/ssl_lib.c"
38317 ))
38318 return 0;
38319 }
38320
38321 sc->ct_validation_callback = callback;
38322 sc->ct_validation_callback_arg = arg;
38323
38324 return 1;
38325 }
38326
38327 int SSL_CTX_set_ct_validation_callback(SSL_CTX *ctx,
38328 ssl_ct_validation_cb callback, void *arg)
38329 {
38330
38331
38332
38333
38334 if (callback !=
38335 # 6280 "ssl/ssl_lib.c" 3 4
38336 ((void *)0)
38337 # 6280 "ssl/ssl_lib.c"
38338 && SSL_CTX_has_client_custom_ext(ctx,
38339 18))
38340 {
38341 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6283,__func__), ERR_set_error)((20),(206),
38342 # 6283 "ssl/ssl_lib.c" 3 4
38343 ((void *)0)
38344 # 6283 "ssl/ssl_lib.c"
38345 );
38346 return 0;
38347 }
38348
38349 ctx->ct_validation_callback = callback;
38350 ctx->ct_validation_callback_arg = arg;
38351 return 1;
38352 }
38353
38354 int SSL_ct_is_enabled(const SSL *s)
38355 {
38356 const SSL_CONNECTION *sc = ((s) ==
38357 # 6294 "ssl/ssl_lib.c" 3 4
38358 ((void *)0)
38359 # 6294 "ssl/ssl_lib.c"
38360 ?
38361 # 6294 "ssl/ssl_lib.c" 3 4
38362 ((void *)0)
38363 # 6294 "ssl/ssl_lib.c"
38364 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
38365 # 6294 "ssl/ssl_lib.c" 3 4
38366 ((void *)0)
38367 # 6294 "ssl/ssl_lib.c"
38368 )));
38369
38370 if (sc ==
38371 # 6296 "ssl/ssl_lib.c" 3 4
38372 ((void *)0)
38373 # 6296 "ssl/ssl_lib.c"
38374 )
38375 return 0;
38376
38377 return sc->ct_validation_callback !=
38378 # 6299 "ssl/ssl_lib.c" 3 4
38379 ((void *)0)
38380 # 6299 "ssl/ssl_lib.c"
38381 ;
38382 }
38383
38384 int SSL_CTX_ct_is_enabled(const SSL_CTX *ctx)
38385 {
38386 return ctx->ct_validation_callback !=
38387 # 6304 "ssl/ssl_lib.c" 3 4
38388 ((void *)0)
38389 # 6304 "ssl/ssl_lib.c"
38390 ;
38391 }
38392
38393 int ssl_validate_ct(SSL_CONNECTION *s)
38394 {
38395 int ret = 0;
38396 X509 *cert = s->session !=
38397 # 6310 "ssl/ssl_lib.c" 3 4
38398 ((void *)0)
38399 # 6310 "ssl/ssl_lib.c"
38400 ? s->session->peer :
38401 # 6310 "ssl/ssl_lib.c" 3 4
38402 ((void *)0)
38403 # 6310 "ssl/ssl_lib.c"
38404 ;
38405 X509 *issuer;
38406 SSL_DANE *dane = &s->dane;
38407 CT_POLICY_EVAL_CTX *ctx =
38408 # 6313 "ssl/ssl_lib.c" 3 4
38409 ((void *)0)
38410 # 6313 "ssl/ssl_lib.c"
38411 ;
38412 const struct stack_st_SCT *scts;
38413 # 6327 "ssl/ssl_lib.c"
38414 if (s->ct_validation_callback ==
38415 # 6327 "ssl/ssl_lib.c" 3 4
38416 ((void *)0)
38417 # 6327 "ssl/ssl_lib.c"
38418 || cert ==
38419 # 6327 "ssl/ssl_lib.c" 3 4
38420 ((void *)0)
38421 # 6327 "ssl/ssl_lib.c"
38422 ||
38423 s->verify_result != 0 ||
38424 s->verified_chain ==
38425 # 6329 "ssl/ssl_lib.c" 3 4
38426 ((void *)0)
38427 # 6329 "ssl/ssl_lib.c"
38428 || OPENSSL_sk_num(ossl_check_const_X509_sk_type(s->verified_chain)) <= 1)
38429 return 1;
38430
38431
38432
38433
38434
38435 if (((dane) !=
38436 # 6336 "ssl/ssl_lib.c" 3 4
38437 ((void *)0)
38438 # 6336 "ssl/ssl_lib.c"
38439 && sk_danetls_record_num((dane)->trecs) > 0) && dane->mtlsa !=
38440 # 6336 "ssl/ssl_lib.c" 3 4
38441 ((void *)0)
38442 # 6336 "ssl/ssl_lib.c"
38443 ) {
38444 switch (dane->mtlsa->usage) {
38445 case 2:
38446 case 3:
38447 return 1;
38448 }
38449 }
38450
38451 ctx = CT_POLICY_EVAL_CTX_new_ex(((s)->ssl.ctx)->libctx,
38452 ((s)->ssl.ctx)->propq);
38453 if (ctx ==
38454 # 6346 "ssl/ssl_lib.c" 3 4
38455 ((void *)0)
38456 # 6346 "ssl/ssl_lib.c"
38457 ) {
38458 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6347, __func__), ossl_statem_fatal)((s), (80), ((50 | (0x2 << 18L))),
38459 # 6347 "ssl/ssl_lib.c" 3 4
38460 ((void *)0)
38461 # 6347 "ssl/ssl_lib.c"
38462 );
38463 goto end;
38464 }
38465
38466 issuer = ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(s->verified_chain), (1)));
38467 CT_POLICY_EVAL_CTX_set1_cert(ctx, cert);
38468 CT_POLICY_EVAL_CTX_set1_issuer(ctx, issuer);
38469 CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(ctx,
38470 ((s)->ssl.ctx)->ctlog_store);
38471 CT_POLICY_EVAL_CTX_set_time(
38472 ctx, (uint64_t)SSL_SESSION_get_time(s->session) * 1000);
38473
38474 scts = SSL_get0_peer_scts((&(s)->ssl));
38475 # 6375 "ssl/ssl_lib.c"
38476 if (SCT_LIST_validate(scts, ctx) < 0) {
38477 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6376, __func__), ossl_statem_fatal)((s), (40), (208),
38478 # 6376 "ssl/ssl_lib.c" 3 4
38479 ((void *)0)
38480 # 6376 "ssl/ssl_lib.c"
38481 );
38482 goto end;
38483 }
38484
38485 ret = s->ct_validation_callback(ctx, scts, s->ct_validation_callback_arg);
38486 if (ret < 0)
38487 ret = 0;
38488 if (!ret)
38489 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6384, __func__), ossl_statem_fatal)((s), (40), (234),
38490 # 6384 "ssl/ssl_lib.c" 3 4
38491 ((void *)0)
38492 # 6384 "ssl/ssl_lib.c"
38493 );
38494
38495 end:
38496 CT_POLICY_EVAL_CTX_free(ctx);
38497 # 6403 "ssl/ssl_lib.c"
38498 if (ret <= 0)
38499 s->verify_result = 71;
38500 return ret;
38501 }
38502
38503 int SSL_CTX_enable_ct(SSL_CTX *ctx, int validation_mode)
38504 {
38505 switch (validation_mode) {
38506 default:
38507 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6412,__func__), ERR_set_error)((20),(212),
38508 # 6412 "ssl/ssl_lib.c" 3 4
38509 ((void *)0)
38510 # 6412 "ssl/ssl_lib.c"
38511 );
38512 return 0;
38513 case SSL_CT_VALIDATION_PERMISSIVE:
38514 return SSL_CTX_set_ct_validation_callback(ctx, ct_permissive,
38515 # 6415 "ssl/ssl_lib.c" 3 4
38516 ((void *)0)
38517 # 6415 "ssl/ssl_lib.c"
38518 );
38519 case SSL_CT_VALIDATION_STRICT:
38520 return SSL_CTX_set_ct_validation_callback(ctx, ct_strict,
38521 # 6417 "ssl/ssl_lib.c" 3 4
38522 ((void *)0)
38523 # 6417 "ssl/ssl_lib.c"
38524 );
38525 }
38526 }
38527
38528 int SSL_enable_ct(SSL *s, int validation_mode)
38529 {
38530 switch (validation_mode) {
38531 default:
38532 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6425,__func__), ERR_set_error)((20),(212),
38533 # 6425 "ssl/ssl_lib.c" 3 4
38534 ((void *)0)
38535 # 6425 "ssl/ssl_lib.c"
38536 );
38537 return 0;
38538 case SSL_CT_VALIDATION_PERMISSIVE:
38539 return SSL_set_ct_validation_callback(s, ct_permissive,
38540 # 6428 "ssl/ssl_lib.c" 3 4
38541 ((void *)0)
38542 # 6428 "ssl/ssl_lib.c"
38543 );
38544 case SSL_CT_VALIDATION_STRICT:
38545 return SSL_set_ct_validation_callback(s, ct_strict,
38546 # 6430 "ssl/ssl_lib.c" 3 4
38547 ((void *)0)
38548 # 6430 "ssl/ssl_lib.c"
38549 );
38550 }
38551 }
38552
38553 int SSL_CTX_set_default_ctlog_list_file(SSL_CTX *ctx)
38554 {
38555 return CTLOG_STORE_load_default_file(ctx->ctlog_store);
38556 }
38557
38558 int SSL_CTX_set_ctlog_list_file(SSL_CTX *ctx, const char *path)
38559 {
38560 return CTLOG_STORE_load_file(ctx->ctlog_store, path);
38561 }
38562
38563 void SSL_CTX_set0_ctlog_store(SSL_CTX *ctx, CTLOG_STORE *logs)
38564 {
38565 CTLOG_STORE_free(ctx->ctlog_store);
38566 ctx->ctlog_store = logs;
38567 }
38568
38569 const CTLOG_STORE *SSL_CTX_get0_ctlog_store(const SSL_CTX *ctx)
38570 {
38571 return ctx->ctlog_store;
38572 }
38573
38574
38575
38576 void SSL_CTX_set_client_hello_cb(SSL_CTX *c, SSL_client_hello_cb_fn cb,
38577 void *arg)
38578 {
38579 c->client_hello_cb = cb;
38580 c->client_hello_cb_arg = arg;
38581 }
38582
38583 int SSL_client_hello_isv2(SSL *s)
38584 {
38585 const SSL_CONNECTION *sc = ((s) ==
38586 # 6466 "ssl/ssl_lib.c" 3 4
38587 ((void *)0)
38588 # 6466 "ssl/ssl_lib.c"
38589 ?
38590 # 6466 "ssl/ssl_lib.c" 3 4
38591 ((void *)0)
38592 # 6466 "ssl/ssl_lib.c"
38593 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
38594 # 6466 "ssl/ssl_lib.c" 3 4
38595 ((void *)0)
38596 # 6466 "ssl/ssl_lib.c"
38597 )));
38598
38599 if (sc ==
38600 # 6468 "ssl/ssl_lib.c" 3 4
38601 ((void *)0)
38602 # 6468 "ssl/ssl_lib.c"
38603 )
38604 return 0;
38605
38606 if (sc->clienthello ==
38607 # 6471 "ssl/ssl_lib.c" 3 4
38608 ((void *)0)
38609 # 6471 "ssl/ssl_lib.c"
38610 )
38611 return 0;
38612 return sc->clienthello->isv2;
38613 }
38614
38615 unsigned int SSL_client_hello_get0_legacy_version(SSL *s)
38616 {
38617 const SSL_CONNECTION *sc = ((s) ==
38618 # 6478 "ssl/ssl_lib.c" 3 4
38619 ((void *)0)
38620 # 6478 "ssl/ssl_lib.c"
38621 ?
38622 # 6478 "ssl/ssl_lib.c" 3 4
38623 ((void *)0)
38624 # 6478 "ssl/ssl_lib.c"
38625 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
38626 # 6478 "ssl/ssl_lib.c" 3 4
38627 ((void *)0)
38628 # 6478 "ssl/ssl_lib.c"
38629 )));
38630
38631 if (sc ==
38632 # 6480 "ssl/ssl_lib.c" 3 4
38633 ((void *)0)
38634 # 6480 "ssl/ssl_lib.c"
38635 )
38636 return 0;
38637
38638 if (sc->clienthello ==
38639 # 6483 "ssl/ssl_lib.c" 3 4
38640 ((void *)0)
38641 # 6483 "ssl/ssl_lib.c"
38642 )
38643 return 0;
38644 return sc->clienthello->legacy_version;
38645 }
38646
38647 size_t SSL_client_hello_get0_random(SSL *s, const unsigned char **out)
38648 {
38649 const SSL_CONNECTION *sc = ((s) ==
38650 # 6490 "ssl/ssl_lib.c" 3 4
38651 ((void *)0)
38652 # 6490 "ssl/ssl_lib.c"
38653 ?
38654 # 6490 "ssl/ssl_lib.c" 3 4
38655 ((void *)0)
38656 # 6490 "ssl/ssl_lib.c"
38657 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
38658 # 6490 "ssl/ssl_lib.c" 3 4
38659 ((void *)0)
38660 # 6490 "ssl/ssl_lib.c"
38661 )));
38662
38663 if (sc ==
38664 # 6492 "ssl/ssl_lib.c" 3 4
38665 ((void *)0)
38666 # 6492 "ssl/ssl_lib.c"
38667 )
38668 return 0;
38669
38670 if (sc->clienthello ==
38671 # 6495 "ssl/ssl_lib.c" 3 4
38672 ((void *)0)
38673 # 6495 "ssl/ssl_lib.c"
38674 )
38675 return 0;
38676 if (out !=
38677 # 6497 "ssl/ssl_lib.c" 3 4
38678 ((void *)0)
38679 # 6497 "ssl/ssl_lib.c"
38680 )
38681 *out = sc->clienthello->random;
38682 return 32;
38683 }
38684
38685 size_t SSL_client_hello_get0_session_id(SSL *s, const unsigned char **out)
38686 {
38687 const SSL_CONNECTION *sc = ((s) ==
38688 # 6504 "ssl/ssl_lib.c" 3 4
38689 ((void *)0)
38690 # 6504 "ssl/ssl_lib.c"
38691 ?
38692 # 6504 "ssl/ssl_lib.c" 3 4
38693 ((void *)0)
38694 # 6504 "ssl/ssl_lib.c"
38695 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
38696 # 6504 "ssl/ssl_lib.c" 3 4
38697 ((void *)0)
38698 # 6504 "ssl/ssl_lib.c"
38699 )));
38700
38701 if (sc ==
38702 # 6506 "ssl/ssl_lib.c" 3 4
38703 ((void *)0)
38704 # 6506 "ssl/ssl_lib.c"
38705 )
38706 return 0;
38707
38708 if (sc->clienthello ==
38709 # 6509 "ssl/ssl_lib.c" 3 4
38710 ((void *)0)
38711 # 6509 "ssl/ssl_lib.c"
38712 )
38713 return 0;
38714 if (out !=
38715 # 6511 "ssl/ssl_lib.c" 3 4
38716 ((void *)0)
38717 # 6511 "ssl/ssl_lib.c"
38718 )
38719 *out = sc->clienthello->session_id;
38720 return sc->clienthello->session_id_len;
38721 }
38722
38723 size_t SSL_client_hello_get0_ciphers(SSL *s, const unsigned char **out)
38724 {
38725 const SSL_CONNECTION *sc = ((s) ==
38726 # 6518 "ssl/ssl_lib.c" 3 4
38727 ((void *)0)
38728 # 6518 "ssl/ssl_lib.c"
38729 ?
38730 # 6518 "ssl/ssl_lib.c" 3 4
38731 ((void *)0)
38732 # 6518 "ssl/ssl_lib.c"
38733 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
38734 # 6518 "ssl/ssl_lib.c" 3 4
38735 ((void *)0)
38736 # 6518 "ssl/ssl_lib.c"
38737 )));
38738
38739 if (sc ==
38740 # 6520 "ssl/ssl_lib.c" 3 4
38741 ((void *)0)
38742 # 6520 "ssl/ssl_lib.c"
38743 )
38744 return 0;
38745
38746 if (sc->clienthello ==
38747 # 6523 "ssl/ssl_lib.c" 3 4
38748 ((void *)0)
38749 # 6523 "ssl/ssl_lib.c"
38750 )
38751 return 0;
38752 if (out !=
38753 # 6525 "ssl/ssl_lib.c" 3 4
38754 ((void *)0)
38755 # 6525 "ssl/ssl_lib.c"
38756 )
38757 *out = PACKET_data(&sc->clienthello->ciphersuites);
38758 return PACKET_remaining(&sc->clienthello->ciphersuites);
38759 }
38760
38761 size_t SSL_client_hello_get0_compression_methods(SSL *s, const unsigned char **out)
38762 {
38763 const SSL_CONNECTION *sc = ((s) ==
38764 # 6532 "ssl/ssl_lib.c" 3 4
38765 ((void *)0)
38766 # 6532 "ssl/ssl_lib.c"
38767 ?
38768 # 6532 "ssl/ssl_lib.c" 3 4
38769 ((void *)0)
38770 # 6532 "ssl/ssl_lib.c"
38771 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
38772 # 6532 "ssl/ssl_lib.c" 3 4
38773 ((void *)0)
38774 # 6532 "ssl/ssl_lib.c"
38775 )));
38776
38777 if (sc ==
38778 # 6534 "ssl/ssl_lib.c" 3 4
38779 ((void *)0)
38780 # 6534 "ssl/ssl_lib.c"
38781 )
38782 return 0;
38783
38784 if (sc->clienthello ==
38785 # 6537 "ssl/ssl_lib.c" 3 4
38786 ((void *)0)
38787 # 6537 "ssl/ssl_lib.c"
38788 )
38789 return 0;
38790 if (out !=
38791 # 6539 "ssl/ssl_lib.c" 3 4
38792 ((void *)0)
38793 # 6539 "ssl/ssl_lib.c"
38794 )
38795 *out = sc->clienthello->compressions;
38796 return sc->clienthello->compressions_len;
38797 }
38798
38799 int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen)
38800 {
38801 RAW_EXTENSION *ext;
38802 int *present;
38803 size_t num = 0, i;
38804 const SSL_CONNECTION *sc = ((s) ==
38805 # 6549 "ssl/ssl_lib.c" 3 4
38806 ((void *)0)
38807 # 6549 "ssl/ssl_lib.c"
38808 ?
38809 # 6549 "ssl/ssl_lib.c" 3 4
38810 ((void *)0)
38811 # 6549 "ssl/ssl_lib.c"
38812 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
38813 # 6549 "ssl/ssl_lib.c" 3 4
38814 ((void *)0)
38815 # 6549 "ssl/ssl_lib.c"
38816 )));
38817
38818 if (sc ==
38819 # 6551 "ssl/ssl_lib.c" 3 4
38820 ((void *)0)
38821 # 6551 "ssl/ssl_lib.c"
38822 )
38823 return 0;
38824
38825 if (sc->clienthello ==
38826 # 6554 "ssl/ssl_lib.c" 3 4
38827 ((void *)0)
38828 # 6554 "ssl/ssl_lib.c"
38829 || out ==
38830 # 6554 "ssl/ssl_lib.c" 3 4
38831 ((void *)0)
38832 # 6554 "ssl/ssl_lib.c"
38833 || outlen ==
38834 # 6554 "ssl/ssl_lib.c" 3 4
38835 ((void *)0)
38836 # 6554 "ssl/ssl_lib.c"
38837 )
38838 return 0;
38839 for (i = 0; i < sc->clienthello->pre_proc_exts_len; i++) {
38840 ext = sc->clienthello->pre_proc_exts + i;
38841 if (ext->present)
38842 num++;
38843 }
38844 if (num == 0) {
38845 *out =
38846 # 6562 "ssl/ssl_lib.c" 3 4
38847 ((void *)0)
38848 # 6562 "ssl/ssl_lib.c"
38849 ;
38850 *outlen = 0;
38851 return 1;
38852 }
38853 if ((present = CRYPTO_malloc(sizeof(*present) * num, "ssl/ssl_lib.c", 6566)) ==
38854 # 6566 "ssl/ssl_lib.c" 3 4
38855 ((void *)0)
38856 # 6566 "ssl/ssl_lib.c"
38857 )
38858 return 0;
38859 for (i = 0; i < sc->clienthello->pre_proc_exts_len; i++) {
38860 ext = sc->clienthello->pre_proc_exts + i;
38861 if (ext->present) {
38862 if (ext->received_order >= num)
38863 goto err;
38864 present[ext->received_order] = ext->type;
38865 }
38866 }
38867 *out = present;
38868 *outlen = num;
38869 return 1;
38870 err:
38871 CRYPTO_free(present, "ssl/ssl_lib.c", 6580);
38872 return 0;
38873 }
38874
38875 int SSL_client_hello_get_extension_order(SSL *s, uint16_t *exts, size_t *num_exts)
38876 {
38877 RAW_EXTENSION *ext;
38878 size_t num = 0, i;
38879 const SSL_CONNECTION *sc = ((s) ==
38880 # 6588 "ssl/ssl_lib.c" 3 4
38881 ((void *)0)
38882 # 6588 "ssl/ssl_lib.c"
38883 ?
38884 # 6588 "ssl/ssl_lib.c" 3 4
38885 ((void *)0)
38886 # 6588 "ssl/ssl_lib.c"
38887 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
38888 # 6588 "ssl/ssl_lib.c" 3 4
38889 ((void *)0)
38890 # 6588 "ssl/ssl_lib.c"
38891 )));
38892
38893 if (sc ==
38894 # 6590 "ssl/ssl_lib.c" 3 4
38895 ((void *)0)
38896 # 6590 "ssl/ssl_lib.c"
38897 )
38898 return 0;
38899
38900 if (sc->clienthello ==
38901 # 6593 "ssl/ssl_lib.c" 3 4
38902 ((void *)0)
38903 # 6593 "ssl/ssl_lib.c"
38904 || num_exts ==
38905 # 6593 "ssl/ssl_lib.c" 3 4
38906 ((void *)0)
38907 # 6593 "ssl/ssl_lib.c"
38908 )
38909 return 0;
38910 for (i = 0; i < sc->clienthello->pre_proc_exts_len; i++) {
38911 ext = sc->clienthello->pre_proc_exts + i;
38912 if (ext->present)
38913 num++;
38914 }
38915 if (num == 0) {
38916 *num_exts = 0;
38917 return 1;
38918 }
38919 if (exts ==
38920 # 6604 "ssl/ssl_lib.c" 3 4
38921 ((void *)0)
38922 # 6604 "ssl/ssl_lib.c"
38923 ) {
38924 *num_exts = num;
38925 return 1;
38926 }
38927 if (*num_exts < num)
38928 return 0;
38929 for (i = 0; i < sc->clienthello->pre_proc_exts_len; i++) {
38930 ext = sc->clienthello->pre_proc_exts + i;
38931 if (ext->present) {
38932 if (ext->received_order >= num)
38933 return 0;
38934 exts[ext->received_order] = ext->type;
38935 }
38936 }
38937 *num_exts = num;
38938 return 1;
38939 }
38940
38941 int SSL_client_hello_get0_ext(SSL *s, unsigned int type, const unsigned char **out,
38942 size_t *outlen)
38943 {
38944 size_t i;
38945 RAW_EXTENSION *r;
38946 const SSL_CONNECTION *sc = ((s) ==
38947 # 6627 "ssl/ssl_lib.c" 3 4
38948 ((void *)0)
38949 # 6627 "ssl/ssl_lib.c"
38950 ?
38951 # 6627 "ssl/ssl_lib.c" 3 4
38952 ((void *)0)
38953 # 6627 "ssl/ssl_lib.c"
38954 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
38955 # 6627 "ssl/ssl_lib.c" 3 4
38956 ((void *)0)
38957 # 6627 "ssl/ssl_lib.c"
38958 )));
38959
38960 if (sc ==
38961 # 6629 "ssl/ssl_lib.c" 3 4
38962 ((void *)0)
38963 # 6629 "ssl/ssl_lib.c"
38964 )
38965 return 0;
38966
38967 if (sc->clienthello ==
38968 # 6632 "ssl/ssl_lib.c" 3 4
38969 ((void *)0)
38970 # 6632 "ssl/ssl_lib.c"
38971 )
38972 return 0;
38973 for (i = 0; i < sc->clienthello->pre_proc_exts_len; ++i) {
38974 r = sc->clienthello->pre_proc_exts + i;
38975 if (r->present && r->type == type) {
38976 if (out !=
38977 # 6637 "ssl/ssl_lib.c" 3 4
38978 ((void *)0)
38979 # 6637 "ssl/ssl_lib.c"
38980 )
38981 *out = PACKET_data(&r->data);
38982 if (outlen !=
38983 # 6639 "ssl/ssl_lib.c" 3 4
38984 ((void *)0)
38985 # 6639 "ssl/ssl_lib.c"
38986 )
38987 *outlen = PACKET_remaining(&r->data);
38988 return 1;
38989 }
38990 }
38991 return 0;
38992 }
38993
38994 int SSL_free_buffers(SSL *ssl)
38995 {
38996 RECORD_LAYER *rl;
38997 SSL_CONNECTION *sc = ((ssl) ==
38998 # 6650 "ssl/ssl_lib.c" 3 4
38999 ((void *)0)
39000 # 6650 "ssl/ssl_lib.c"
39001 ?
39002 # 6650 "ssl/ssl_lib.c" 3 4
39003 ((void *)0)
39004 # 6650 "ssl/ssl_lib.c"
39005 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) :
39006 # 6650 "ssl/ssl_lib.c" 3 4
39007 ((void *)0)
39008 # 6650 "ssl/ssl_lib.c"
39009 ));
39010
39011 if (sc ==
39012 # 6652 "ssl/ssl_lib.c" 3 4
39013 ((void *)0)
39014 # 6652 "ssl/ssl_lib.c"
39015 )
39016 return 0;
39017
39018 rl = &sc->rlayer;
39019
39020 return rl->rrlmethod->free_buffers(rl->rrl)
39021 && rl->wrlmethod->free_buffers(rl->wrl);
39022 }
39023
39024 int SSL_alloc_buffers(SSL *ssl)
39025 {
39026 RECORD_LAYER *rl;
39027 SSL_CONNECTION *sc = ((ssl) ==
39028 # 6664 "ssl/ssl_lib.c" 3 4
39029 ((void *)0)
39030 # 6664 "ssl/ssl_lib.c"
39031 ?
39032 # 6664 "ssl/ssl_lib.c" 3 4
39033 ((void *)0)
39034 # 6664 "ssl/ssl_lib.c"
39035 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls :
39036 # 6664 "ssl/ssl_lib.c" 3 4
39037 ((void *)0)
39038 # 6664 "ssl/ssl_lib.c"
39039 )));
39040
39041 if (sc ==
39042 # 6666 "ssl/ssl_lib.c" 3 4
39043 ((void *)0)
39044 # 6666 "ssl/ssl_lib.c"
39045 )
39046 return 0;
39047
39048
39049 if (((ssl) !=
39050 # 6670 "ssl/ssl_lib.c" 3 4
39051 ((void *)0)
39052 # 6670 "ssl/ssl_lib.c"
39053 && ((ssl)->type == 1 || (ssl)->type == 2)))
39054 return 1;
39055
39056 rl = &sc->rlayer;
39057
39058 return rl->rrlmethod->alloc_buffers(rl->rrl)
39059 && rl->wrlmethod->alloc_buffers(rl->wrl);
39060 }
39061
39062 void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb)
39063 {
39064 ctx->keylog_callback = cb;
39065 }
39066
39067 SSL_CTX_keylog_cb_func SSL_CTX_get_keylog_callback(const SSL_CTX *ctx)
39068 {
39069 return ctx->keylog_callback;
39070 }
39071
39072 static int nss_keylog_int(const char *prefix,
39073 SSL_CONNECTION *sc,
39074 const uint8_t *parameter_1,
39075 size_t parameter_1_len,
39076 const uint8_t *parameter_2,
39077 size_t parameter_2_len)
39078 {
39079 char *out =
39080 # 6696 "ssl/ssl_lib.c" 3 4
39081 ((void *)0)
39082 # 6696 "ssl/ssl_lib.c"
39083 ;
39084 char *cursor =
39085 # 6697 "ssl/ssl_lib.c" 3 4
39086 ((void *)0)
39087 # 6697 "ssl/ssl_lib.c"
39088 ;
39089 size_t out_len = 0;
39090 size_t i;
39091 size_t prefix_len;
39092 SSL_CTX *sctx = ((sc)->ssl.ctx);
39093
39094 if (sctx->keylog_callback ==
39095 # 6703 "ssl/ssl_lib.c" 3 4
39096 ((void *)0)
39097 # 6703 "ssl/ssl_lib.c"
39098 )
39099 return 1;
39100 # 6714 "ssl/ssl_lib.c"
39101 prefix_len = strlen(prefix);
39102 out_len = prefix_len + (2 * parameter_1_len) + (2 * parameter_2_len) + 3;
39103 if ((out = cursor = CRYPTO_malloc(out_len, "ssl/ssl_lib.c", 6716)) ==
39104 # 6716 "ssl/ssl_lib.c" 3 4
39105 ((void *)0)
39106 # 6716 "ssl/ssl_lib.c"
39107 )
39108 return 0;
39109
39110 strcpy(cursor, prefix);
39111 cursor += prefix_len;
39112 *cursor++ = ' ';
39113
39114 for (i = 0; i < parameter_1_len; i++) {
39115 sprintf(cursor, "%02x", parameter_1[i]);
39116 cursor += 2;
39117 }
39118 *cursor++ = ' ';
39119
39120 for (i = 0; i < parameter_2_len; i++) {
39121 sprintf(cursor, "%02x", parameter_2[i]);
39122 cursor += 2;
39123 }
39124 *cursor = '\0';
39125
39126 sctx->keylog_callback((&(sc)->ssl), (const char *)out);
39127 CRYPTO_clear_free(out, out_len, "ssl/ssl_lib.c", 6736);
39128 return 1;
39129
39130 }
39131
39132 int ssl_log_rsa_client_key_exchange(SSL_CONNECTION *sc,
39133 const uint8_t *encrypted_premaster,
39134 size_t encrypted_premaster_len,
39135 const uint8_t *premaster,
39136 size_t premaster_len)
39137 {
39138 if (encrypted_premaster_len < 8) {
39139 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6748, __func__), ossl_statem_fatal)((sc), (80), ((259|((0x1 << 18L)|(0x2 << 18L)))),
39140 # 6748 "ssl/ssl_lib.c" 3 4
39141 ((void *)0)
39142 # 6748 "ssl/ssl_lib.c"
39143 );
39144 return 0;
39145 }
39146
39147
39148 return nss_keylog_int("RSA",
39149 sc,
39150 encrypted_premaster,
39151 8,
39152 premaster,
39153 premaster_len);
39154 }
39155
39156 int ssl_log_secret(SSL_CONNECTION *sc,
39157 const char *label,
39158 const uint8_t *secret,
39159 size_t secret_len)
39160 {
39161 return nss_keylog_int(label,
39162 sc,
39163 sc->s3.client_random,
39164 32,
39165 secret,
39166 secret_len);
39167 }
39168
39169
39170
39171 int ssl_cache_cipherlist(SSL_CONNECTION *s, PACKET *cipher_suites, int sslv2format)
39172 {
39173 int n;
39174
39175 n = sslv2format ? 3 : 2;
39176
39177 if (PACKET_remaining(cipher_suites) == 0) {
39178 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6783, __func__), ossl_statem_fatal)((s), (47), (183),
39179 # 6783 "ssl/ssl_lib.c" 3 4
39180 ((void *)0)
39181 # 6783 "ssl/ssl_lib.c"
39182 );
39183 return 0;
39184 }
39185
39186 if (PACKET_remaining(cipher_suites) % n != 0) {
39187 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6788, __func__), ossl_statem_fatal)((s), (50), (151),
39188 # 6788 "ssl/ssl_lib.c" 3 4
39189 ((void *)0)
39190 # 6788 "ssl/ssl_lib.c"
39191 );
39192 return 0;
39193 }
39194
39195 CRYPTO_free(s->s3.tmp.ciphers_raw, "ssl/ssl_lib.c", 6792);
39196 s->s3.tmp.ciphers_raw =
39197 # 6793 "ssl/ssl_lib.c" 3 4
39198 ((void *)0)
39199 # 6793 "ssl/ssl_lib.c"
39200 ;
39201 s->s3.tmp.ciphers_rawlen = 0;
39202
39203 if (sslv2format) {
39204 size_t numciphers = PACKET_remaining(cipher_suites) / n;
39205 PACKET sslv2ciphers = *cipher_suites;
39206 unsigned int leadbyte;
39207 unsigned char *raw;
39208 # 6809 "ssl/ssl_lib.c"
39209 raw = CRYPTO_malloc(numciphers * 2, "ssl/ssl_lib.c", 6809);
39210 s->s3.tmp.ciphers_raw = raw;
39211 if (raw ==
39212 # 6811 "ssl/ssl_lib.c" 3 4
39213 ((void *)0)
39214 # 6811 "ssl/ssl_lib.c"
39215 ) {
39216 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6812, __func__), ossl_statem_fatal)((s), (80), ((15 | (0x2 << 18L))),
39217 # 6812 "ssl/ssl_lib.c" 3 4
39218 ((void *)0)
39219 # 6812 "ssl/ssl_lib.c"
39220 );
39221 return 0;
39222 }
39223 for (s->s3.tmp.ciphers_rawlen = 0;
39224 PACKET_remaining(&sslv2ciphers) > 0;
39225 raw += 2) {
39226 if (!PACKET_get_1(&sslv2ciphers, &leadbyte)
39227 || (leadbyte == 0
39228 && !PACKET_copy_bytes(&sslv2ciphers, raw,
39229 2))
39230 || (leadbyte != 0
39231 && !PACKET_forward(&sslv2ciphers, 2))) {
39232 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6824, __func__), ossl_statem_fatal)((s), (50), (240),
39233 # 6824 "ssl/ssl_lib.c" 3 4
39234 ((void *)0)
39235 # 6824 "ssl/ssl_lib.c"
39236 );
39237 CRYPTO_free(s->s3.tmp.ciphers_raw, "ssl/ssl_lib.c", 6825);
39238 s->s3.tmp.ciphers_raw =
39239 # 6826 "ssl/ssl_lib.c" 3 4
39240 ((void *)0)
39241 # 6826 "ssl/ssl_lib.c"
39242 ;
39243 s->s3.tmp.ciphers_rawlen = 0;
39244 return 0;
39245 }
39246 if (leadbyte == 0)
39247 s->s3.tmp.ciphers_rawlen += 2;
39248 }
39249 } else if (!PACKET_memdup(cipher_suites, &s->s3.tmp.ciphers_raw,
39250 &s->s3.tmp.ciphers_rawlen)) {
39251 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6835, __func__), ossl_statem_fatal)((s), (80), ((259|((0x1 << 18L)|(0x2 << 18L)))),
39252 # 6835 "ssl/ssl_lib.c" 3 4
39253 ((void *)0)
39254 # 6835 "ssl/ssl_lib.c"
39255 );
39256 return 0;
39257 }
39258 return 1;
39259 }
39260
39261 int SSL_bytes_to_cipher_list(SSL *s, const unsigned char *bytes, size_t len,
39262 int isv2format, struct stack_st_SSL_CIPHER **sk,
39263 struct stack_st_SSL_CIPHER **scsvs)
39264 {
39265 PACKET pkt;
39266 SSL_CONNECTION *sc = ((s) ==
39267 # 6846 "ssl/ssl_lib.c" 3 4
39268 ((void *)0)
39269 # 6846 "ssl/ssl_lib.c"
39270 ?
39271 # 6846 "ssl/ssl_lib.c" 3 4
39272 ((void *)0)
39273 # 6846 "ssl/ssl_lib.c"
39274 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
39275 # 6846 "ssl/ssl_lib.c" 3 4
39276 ((void *)0)
39277 # 6846 "ssl/ssl_lib.c"
39278 )));
39279
39280 if (sc ==
39281 # 6848 "ssl/ssl_lib.c" 3 4
39282 ((void *)0)
39283 # 6848 "ssl/ssl_lib.c"
39284 )
39285 return 0;
39286
39287 if (!PACKET_buf_init(&pkt, bytes, len))
39288 return 0;
39289 return ossl_bytes_to_cipher_list(sc, &pkt, sk, scsvs, isv2format, 0);
39290 }
39291
39292 int ossl_bytes_to_cipher_list(SSL_CONNECTION *s, PACKET *cipher_suites,
39293 struct stack_st_SSL_CIPHER **skp,
39294 struct stack_st_SSL_CIPHER **scsvs_out,
39295 int sslv2format, int fatal)
39296 {
39297 const SSL_CIPHER *c;
39298 struct stack_st_SSL_CIPHER *sk =
39299 # 6862 "ssl/ssl_lib.c" 3 4
39300 ((void *)0)
39301 # 6862 "ssl/ssl_lib.c"
39302 ;
39303 struct stack_st_SSL_CIPHER *scsvs =
39304 # 6863 "ssl/ssl_lib.c" 3 4
39305 ((void *)0)
39306 # 6863 "ssl/ssl_lib.c"
39307 ;
39308 int n;
39309
39310 unsigned char cipher[3];
39311
39312 n = sslv2format ? 3 : 2;
39313
39314 if (PACKET_remaining(cipher_suites) == 0) {
39315 if (fatal)
39316 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6872, __func__), ossl_statem_fatal)((s), (47), (183),
39317 # 6872 "ssl/ssl_lib.c" 3 4
39318 ((void *)0)
39319 # 6872 "ssl/ssl_lib.c"
39320 );
39321 else
39322 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6874,__func__), ERR_set_error)((20),(183),
39323 # 6874 "ssl/ssl_lib.c" 3 4
39324 ((void *)0)
39325 # 6874 "ssl/ssl_lib.c"
39326 );
39327 return 0;
39328 }
39329
39330 if (PACKET_remaining(cipher_suites) % n != 0) {
39331 if (fatal)
39332 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6880, __func__), ossl_statem_fatal)((s), (50), (151),
39333 # 6880 "ssl/ssl_lib.c" 3 4
39334 ((void *)0)
39335 # 6880 "ssl/ssl_lib.c"
39336 )
39337 ;
39338 else
39339 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6883,__func__), ERR_set_error)((20),(151),
39340 # 6883 "ssl/ssl_lib.c" 3 4
39341 ((void *)0)
39342 # 6883 "ssl/ssl_lib.c"
39343 );
39344 return 0;
39345 }
39346
39347 sk = ((struct stack_st_SSL_CIPHER *)OPENSSL_sk_new_null());
39348 scsvs = ((struct stack_st_SSL_CIPHER *)OPENSSL_sk_new_null());
39349 if (sk ==
39350 # 6889 "ssl/ssl_lib.c" 3 4
39351 ((void *)0)
39352 # 6889 "ssl/ssl_lib.c"
39353 || scsvs ==
39354 # 6889 "ssl/ssl_lib.c" 3 4
39355 ((void *)0)
39356 # 6889 "ssl/ssl_lib.c"
39357 ) {
39358 if (fatal)
39359 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6891, __func__), ossl_statem_fatal)((s), (80), ((15 | (0x2 << 18L))),
39360 # 6891 "ssl/ssl_lib.c" 3 4
39361 ((void *)0)
39362 # 6891 "ssl/ssl_lib.c"
39363 );
39364 else
39365 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6893,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
39366 # 6893 "ssl/ssl_lib.c" 3 4
39367 ((void *)0)
39368 # 6893 "ssl/ssl_lib.c"
39369 );
39370 goto err;
39371 }
39372
39373 while (PACKET_copy_bytes(cipher_suites, cipher, n)) {
39374
39375
39376
39377
39378
39379 if (sslv2format && cipher[0] != '\0')
39380 continue;
39381
39382
39383 c = ssl_get_cipher_by_char(s, sslv2format ? &cipher[1] : cipher, 1);
39384 if (c !=
39385 # 6908 "ssl/ssl_lib.c" 3 4
39386 ((void *)0)
39387 # 6908 "ssl/ssl_lib.c"
39388 ) {
39389 if ((c->valid && !OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(c))) ||
39390 (!c->valid && !OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(scsvs), ossl_check_SSL_CIPHER_type(c)))) {
39391 if (fatal)
39392 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6912, __func__), ossl_statem_fatal)((s), (80), ((15 | (0x2 << 18L))),
39393 # 6912 "ssl/ssl_lib.c" 3 4
39394 ((void *)0)
39395 # 6912 "ssl/ssl_lib.c"
39396 );
39397 else
39398 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6914,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
39399 # 6914 "ssl/ssl_lib.c" 3 4
39400 ((void *)0)
39401 # 6914 "ssl/ssl_lib.c"
39402 );
39403 goto err;
39404 }
39405 }
39406 }
39407 if (PACKET_remaining(cipher_suites) > 0) {
39408 if (fatal)
39409 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6921, __func__), ossl_statem_fatal)((s), (50), (271),
39410 # 6921 "ssl/ssl_lib.c" 3 4
39411 ((void *)0)
39412 # 6921 "ssl/ssl_lib.c"
39413 );
39414 else
39415 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6923,__func__), ERR_set_error)((20),(271),
39416 # 6923 "ssl/ssl_lib.c" 3 4
39417 ((void *)0)
39418 # 6923 "ssl/ssl_lib.c"
39419 );
39420 goto err;
39421 }
39422
39423 if (skp !=
39424 # 6927 "ssl/ssl_lib.c" 3 4
39425 ((void *)0)
39426 # 6927 "ssl/ssl_lib.c"
39427 )
39428 *skp = sk;
39429 else
39430 OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk));
39431 if (scsvs_out !=
39432 # 6931 "ssl/ssl_lib.c" 3 4
39433 ((void *)0)
39434 # 6931 "ssl/ssl_lib.c"
39435 )
39436 *scsvs_out = scsvs;
39437 else
39438 OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(scsvs));
39439 return 1;
39440 err:
39441 OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk));
39442 OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(scsvs));
39443 return 0;
39444 }
39445
39446 int SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data)
39447 {
39448 ctx->max_early_data = max_early_data;
39449
39450 return 1;
39451 }
39452
39453 uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx)
39454 {
39455 return ctx->max_early_data;
39456 }
39457
39458 int SSL_set_max_early_data(SSL *s, uint32_t max_early_data)
39459 {
39460 SSL_CONNECTION *sc = ((s) ==
39461 # 6956 "ssl/ssl_lib.c" 3 4
39462 ((void *)0)
39463 # 6956 "ssl/ssl_lib.c"
39464 ?
39465 # 6956 "ssl/ssl_lib.c" 3 4
39466 ((void *)0)
39467 # 6956 "ssl/ssl_lib.c"
39468 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
39469 # 6956 "ssl/ssl_lib.c" 3 4
39470 ((void *)0)
39471 # 6956 "ssl/ssl_lib.c"
39472 ));
39473
39474 if (sc ==
39475 # 6958 "ssl/ssl_lib.c" 3 4
39476 ((void *)0)
39477 # 6958 "ssl/ssl_lib.c"
39478 )
39479 return 0;
39480
39481 sc->max_early_data = max_early_data;
39482
39483 return 1;
39484 }
39485
39486 uint32_t SSL_get_max_early_data(const SSL *s)
39487 {
39488 const SSL_CONNECTION *sc = ((s) ==
39489 # 6968 "ssl/ssl_lib.c" 3 4
39490 ((void *)0)
39491 # 6968 "ssl/ssl_lib.c"
39492 ?
39493 # 6968 "ssl/ssl_lib.c" 3 4
39494 ((void *)0)
39495 # 6968 "ssl/ssl_lib.c"
39496 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
39497 # 6968 "ssl/ssl_lib.c" 3 4
39498 ((void *)0)
39499 # 6968 "ssl/ssl_lib.c"
39500 )));
39501
39502 if (sc ==
39503 # 6970 "ssl/ssl_lib.c" 3 4
39504 ((void *)0)
39505 # 6970 "ssl/ssl_lib.c"
39506 )
39507 return 0;
39508
39509 return sc->max_early_data;
39510 }
39511
39512 int SSL_CTX_set_recv_max_early_data(SSL_CTX *ctx, uint32_t recv_max_early_data)
39513 {
39514 ctx->recv_max_early_data = recv_max_early_data;
39515
39516 return 1;
39517 }
39518
39519 uint32_t SSL_CTX_get_recv_max_early_data(const SSL_CTX *ctx)
39520 {
39521 return ctx->recv_max_early_data;
39522 }
39523
39524 int SSL_set_recv_max_early_data(SSL *s, uint32_t recv_max_early_data)
39525 {
39526 SSL_CONNECTION *sc = ((s) ==
39527 # 6990 "ssl/ssl_lib.c" 3 4
39528 ((void *)0)
39529 # 6990 "ssl/ssl_lib.c"
39530 ?
39531 # 6990 "ssl/ssl_lib.c" 3 4
39532 ((void *)0)
39533 # 6990 "ssl/ssl_lib.c"
39534 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
39535 # 6990 "ssl/ssl_lib.c" 3 4
39536 ((void *)0)
39537 # 6990 "ssl/ssl_lib.c"
39538 ));
39539
39540 if (sc ==
39541 # 6992 "ssl/ssl_lib.c" 3 4
39542 ((void *)0)
39543 # 6992 "ssl/ssl_lib.c"
39544 )
39545 return 0;
39546
39547 sc->recv_max_early_data = recv_max_early_data;
39548
39549 return 1;
39550 }
39551
39552 uint32_t SSL_get_recv_max_early_data(const SSL *s)
39553 {
39554 const SSL_CONNECTION *sc = ((s) ==
39555 # 7002 "ssl/ssl_lib.c" 3 4
39556 ((void *)0)
39557 # 7002 "ssl/ssl_lib.c"
39558 ?
39559 # 7002 "ssl/ssl_lib.c" 3 4
39560 ((void *)0)
39561 # 7002 "ssl/ssl_lib.c"
39562 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
39563 # 7002 "ssl/ssl_lib.c" 3 4
39564 ((void *)0)
39565 # 7002 "ssl/ssl_lib.c"
39566 )));
39567
39568 if (sc ==
39569 # 7004 "ssl/ssl_lib.c" 3 4
39570 ((void *)0)
39571 # 7004 "ssl/ssl_lib.c"
39572 )
39573 return 0;
39574
39575 return sc->recv_max_early_data;
39576 }
39577
39578 unsigned int ssl_get_max_send_fragment(const SSL_CONNECTION *sc)
39579 {
39580
39581 if (sc->session !=
39582 # 7013 "ssl/ssl_lib.c" 3 4
39583 ((void *)0)
39584 # 7013 "ssl/ssl_lib.c"
39585 && (((sc->session->ext.max_fragment_len_mode) >= 1) && ((sc->session->ext.max_fragment_len_mode) <= 4)))
39586 return (512U << (sc->session->ext.max_fragment_len_mode - 1));
39587
39588
39589 return sc->max_send_fragment;
39590 }
39591
39592 unsigned int ssl_get_split_send_fragment(const SSL_CONNECTION *sc)
39593 {
39594
39595 if (sc->session !=
39596 # 7023 "ssl/ssl_lib.c" 3 4
39597 ((void *)0)
39598 # 7023 "ssl/ssl_lib.c"
39599 && (((sc->session->ext.max_fragment_len_mode) >= 1) && ((sc->session->ext.max_fragment_len_mode) <= 4))
39600 && sc->split_send_fragment > (512U << (sc->session->ext.max_fragment_len_mode - 1)))
39601 return (512U << (sc->session->ext.max_fragment_len_mode - 1));
39602
39603
39604 if (sc->split_send_fragment > sc->max_send_fragment)
39605 return sc->max_send_fragment;
39606
39607
39608 return sc->split_send_fragment;
39609 }
39610
39611 int SSL_stateless(SSL *s)
39612 {
39613 int ret;
39614 SSL_CONNECTION *sc = ((s) ==
39615 # 7038 "ssl/ssl_lib.c" 3 4
39616 ((void *)0)
39617 # 7038 "ssl/ssl_lib.c"
39618 ?
39619 # 7038 "ssl/ssl_lib.c" 3 4
39620 ((void *)0)
39621 # 7038 "ssl/ssl_lib.c"
39622 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
39623 # 7038 "ssl/ssl_lib.c" 3 4
39624 ((void *)0)
39625 # 7038 "ssl/ssl_lib.c"
39626 ));
39627
39628 if (sc ==
39629 # 7040 "ssl/ssl_lib.c" 3 4
39630 ((void *)0)
39631 # 7040 "ssl/ssl_lib.c"
39632 )
39633 return 0;
39634
39635
39636 if (!SSL_clear(s))
39637 return 0;
39638
39639 ERR_clear_error();
39640
39641 sc->s3.flags |= 0x0800;
39642 ret = SSL_accept(s);
39643 sc->s3.flags &= ~0x0800;
39644
39645 if (ret > 0 && sc->ext.cookieok)
39646 return 1;
39647
39648 if (sc->hello_retry_request == SSL_HRR_PENDING && !ossl_statem_in_error(sc))
39649 return 0;
39650
39651 return -1;
39652 }
39653
39654 void SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val)
39655 {
39656 ctx->pha_enabled = val;
39657 }
39658
39659 void SSL_set_post_handshake_auth(SSL *ssl, int val)
39660 {
39661 SSL_CONNECTION *sc = ((ssl) ==
39662 # 7069 "ssl/ssl_lib.c" 3 4
39663 ((void *)0)
39664 # 7069 "ssl/ssl_lib.c"
39665 ?
39666 # 7069 "ssl/ssl_lib.c" 3 4
39667 ((void *)0)
39668 # 7069 "ssl/ssl_lib.c"
39669 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) :
39670 # 7069 "ssl/ssl_lib.c" 3 4
39671 ((void *)0)
39672 # 7069 "ssl/ssl_lib.c"
39673 ));
39674
39675 if (sc ==
39676 # 7071 "ssl/ssl_lib.c" 3 4
39677 ((void *)0)
39678 # 7071 "ssl/ssl_lib.c"
39679 )
39680 return;
39681
39682 sc->pha_enabled = val;
39683 }
39684
39685 int SSL_verify_client_post_handshake(SSL *ssl)
39686 {
39687 SSL_CONNECTION *sc = ((ssl) ==
39688 # 7079 "ssl/ssl_lib.c" 3 4
39689 ((void *)0)
39690 # 7079 "ssl/ssl_lib.c"
39691 ?
39692 # 7079 "ssl/ssl_lib.c" 3 4
39693 ((void *)0)
39694 # 7079 "ssl/ssl_lib.c"
39695 : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls :
39696 # 7079 "ssl/ssl_lib.c" 3 4
39697 ((void *)0)
39698 # 7079 "ssl/ssl_lib.c"
39699 )));
39700
39701
39702 if (((ssl) !=
39703 # 7082 "ssl/ssl_lib.c" 3 4
39704 ((void *)0)
39705 # 7082 "ssl/ssl_lib.c"
39706 && ((ssl)->type == 1 || (ssl)->type == 2))) {
39707 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7083,__func__), ERR_set_error)((20),(266),
39708 # 7083 "ssl/ssl_lib.c" 3 4
39709 ((void *)0)
39710 # 7083 "ssl/ssl_lib.c"
39711 );
39712 return 0;
39713 }
39714
39715
39716 if (sc ==
39717 # 7088 "ssl/ssl_lib.c" 3 4
39718 ((void *)0)
39719 # 7088 "ssl/ssl_lib.c"
39720 )
39721 return 0;
39722
39723 if (!(!((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(sc)->ssl)->method->version >= 0x0304 && (&(sc)->ssl)->method->version != 0x10000)) {
39724 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7092,__func__), ERR_set_error)((20),(266),
39725 # 7092 "ssl/ssl_lib.c" 3 4
39726 ((void *)0)
39727 # 7092 "ssl/ssl_lib.c"
39728 );
39729 return 0;
39730 }
39731 if (!sc->server) {
39732 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7096,__func__), ERR_set_error)((20),(284),
39733 # 7096 "ssl/ssl_lib.c" 3 4
39734 ((void *)0)
39735 # 7096 "ssl/ssl_lib.c"
39736 );
39737 return 0;
39738 }
39739
39740 if (!SSL_is_init_finished(ssl)) {
39741 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7101,__func__), ERR_set_error)((20),(121),
39742 # 7101 "ssl/ssl_lib.c" 3 4
39743 ((void *)0)
39744 # 7101 "ssl/ssl_lib.c"
39745 );
39746 return 0;
39747 }
39748
39749 switch (sc->post_handshake_auth) {
39750 case SSL_PHA_NONE:
39751 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7107,__func__), ERR_set_error)((20),(279),
39752 # 7107 "ssl/ssl_lib.c" 3 4
39753 ((void *)0)
39754 # 7107 "ssl/ssl_lib.c"
39755 );
39756 return 0;
39757 default:
39758 case SSL_PHA_EXT_SENT:
39759 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7111,__func__), ERR_set_error)((20),((259|((0x1 << 18L)|(0x2 << 18L)))),
39760 # 7111 "ssl/ssl_lib.c" 3 4
39761 ((void *)0)
39762 # 7111 "ssl/ssl_lib.c"
39763 );
39764 return 0;
39765 case SSL_PHA_EXT_RECEIVED:
39766 break;
39767 case SSL_PHA_REQUEST_PENDING:
39768 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7116,__func__), ERR_set_error)((20),(285),
39769 # 7116 "ssl/ssl_lib.c" 3 4
39770 ((void *)0)
39771 # 7116 "ssl/ssl_lib.c"
39772 );
39773 return 0;
39774 case SSL_PHA_REQUESTED:
39775 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7119,__func__), ERR_set_error)((20),(286),
39776 # 7119 "ssl/ssl_lib.c" 3 4
39777 ((void *)0)
39778 # 7119 "ssl/ssl_lib.c"
39779 );
39780 return 0;
39781 }
39782
39783 sc->post_handshake_auth = SSL_PHA_REQUEST_PENDING;
39784
39785
39786 if (!send_certificate_request(sc)) {
39787 sc->post_handshake_auth = SSL_PHA_EXT_RECEIVED;
39788 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7128,__func__), ERR_set_error)((20),(283),
39789 # 7128 "ssl/ssl_lib.c" 3 4
39790 ((void *)0)
39791 # 7128 "ssl/ssl_lib.c"
39792 );
39793 return 0;
39794 }
39795
39796 ossl_statem_set_in_init(sc, 1);
39797 return 1;
39798 }
39799
39800 int SSL_CTX_set_session_ticket_cb(SSL_CTX *ctx,
39801 SSL_CTX_generate_session_ticket_fn gen_cb,
39802 SSL_CTX_decrypt_session_ticket_fn dec_cb,
39803 void *arg)
39804 {
39805 ctx->generate_ticket_cb = gen_cb;
39806 ctx->decrypt_ticket_cb = dec_cb;
39807 ctx->ticket_cb_data = arg;
39808 return 1;
39809 }
39810
39811 void SSL_CTX_set_allow_early_data_cb(SSL_CTX *ctx,
39812 SSL_allow_early_data_cb_fn cb,
39813 void *arg)
39814 {
39815 ctx->allow_early_data_cb = cb;
39816 ctx->allow_early_data_cb_data = arg;
39817 }
39818
39819 void SSL_set_allow_early_data_cb(SSL *s,
39820 SSL_allow_early_data_cb_fn cb,
39821 void *arg)
39822 {
39823 SSL_CONNECTION *sc = ((s) ==
39824 # 7159 "ssl/ssl_lib.c" 3 4
39825 ((void *)0)
39826 # 7159 "ssl/ssl_lib.c"
39827 ?
39828 # 7159 "ssl/ssl_lib.c" 3 4
39829 ((void *)0)
39830 # 7159 "ssl/ssl_lib.c"
39831 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
39832 # 7159 "ssl/ssl_lib.c" 3 4
39833 ((void *)0)
39834 # 7159 "ssl/ssl_lib.c"
39835 ));
39836
39837 if (sc ==
39838 # 7161 "ssl/ssl_lib.c" 3 4
39839 ((void *)0)
39840 # 7161 "ssl/ssl_lib.c"
39841 )
39842 return;
39843
39844 sc->allow_early_data_cb = cb;
39845 sc->allow_early_data_cb_data = arg;
39846 }
39847
39848 const EVP_CIPHER *ssl_evp_cipher_fetch(OSSL_LIB_CTX *libctx,
39849 int nid,
39850 const char *properties)
39851 {
39852 const EVP_CIPHER *ciph;
39853
39854 ciph = tls_get_cipher_from_engine(nid);
39855 if (ciph !=
39856 # 7175 "ssl/ssl_lib.c" 3 4
39857 ((void *)0)
39858 # 7175 "ssl/ssl_lib.c"
39859 )
39860 return ciph;
39861
39862
39863
39864
39865
39866 ERR_set_mark();
39867 ciph = EVP_CIPHER_fetch(libctx, OBJ_nid2sn(nid), properties);
39868 ERR_pop_to_mark();
39869 return ciph;
39870 }
39871
39872
39873 int ssl_evp_cipher_up_ref(const EVP_CIPHER *cipher)
39874 {
39875
39876 if (EVP_CIPHER_get0_provider(cipher) ==
39877 # 7192 "ssl/ssl_lib.c" 3 4
39878 ((void *)0)
39879 # 7192 "ssl/ssl_lib.c"
39880 )
39881 return 1;
39882
39883
39884
39885
39886
39887 return EVP_CIPHER_up_ref((EVP_CIPHER *)cipher);
39888 }
39889
39890 void ssl_evp_cipher_free(const EVP_CIPHER *cipher)
39891 {
39892 if (cipher ==
39893 # 7204 "ssl/ssl_lib.c" 3 4
39894 ((void *)0)
39895 # 7204 "ssl/ssl_lib.c"
39896 )
39897 return;
39898
39899 if (EVP_CIPHER_get0_provider(cipher) !=
39900 # 7207 "ssl/ssl_lib.c" 3 4
39901 ((void *)0)
39902 # 7207 "ssl/ssl_lib.c"
39903 ) {
39904
39905
39906
39907
39908 EVP_CIPHER_free((EVP_CIPHER *)cipher);
39909 }
39910 }
39911
39912 const EVP_MD *ssl_evp_md_fetch(OSSL_LIB_CTX *libctx,
39913 int nid,
39914 const char *properties)
39915 {
39916 const EVP_MD *md;
39917
39918 md = tls_get_digest_from_engine(nid);
39919 if (md !=
39920 # 7223 "ssl/ssl_lib.c" 3 4
39921 ((void *)0)
39922 # 7223 "ssl/ssl_lib.c"
39923 )
39924 return md;
39925
39926
39927 ERR_set_mark();
39928 md = EVP_MD_fetch(libctx, OBJ_nid2sn(nid), properties);
39929 ERR_pop_to_mark();
39930 return md;
39931 }
39932
39933 int ssl_evp_md_up_ref(const EVP_MD *md)
39934 {
39935
39936 if (EVP_MD_get0_provider(md) ==
39937 # 7236 "ssl/ssl_lib.c" 3 4
39938 ((void *)0)
39939 # 7236 "ssl/ssl_lib.c"
39940 )
39941 return 1;
39942
39943
39944
39945
39946
39947 return EVP_MD_up_ref((EVP_MD *)md);
39948 }
39949
39950 void ssl_evp_md_free(const EVP_MD *md)
39951 {
39952 if (md ==
39953 # 7248 "ssl/ssl_lib.c" 3 4
39954 ((void *)0)
39955 # 7248 "ssl/ssl_lib.c"
39956 )
39957 return;
39958
39959 if (EVP_MD_get0_provider(md) !=
39960 # 7251 "ssl/ssl_lib.c" 3 4
39961 ((void *)0)
39962 # 7251 "ssl/ssl_lib.c"
39963 ) {
39964
39965
39966
39967
39968 EVP_MD_free((EVP_MD *)md);
39969 }
39970 }
39971
39972 int SSL_set0_tmp_dh_pkey(SSL *s, EVP_PKEY *dhpkey)
39973 {
39974 SSL_CONNECTION *sc = ((s) ==
39975 # 7262 "ssl/ssl_lib.c" 3 4
39976 ((void *)0)
39977 # 7262 "ssl/ssl_lib.c"
39978 ?
39979 # 7262 "ssl/ssl_lib.c" 3 4
39980 ((void *)0)
39981 # 7262 "ssl/ssl_lib.c"
39982 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
39983 # 7262 "ssl/ssl_lib.c" 3 4
39984 ((void *)0)
39985 # 7262 "ssl/ssl_lib.c"
39986 )));
39987
39988 if (sc ==
39989 # 7264 "ssl/ssl_lib.c" 3 4
39990 ((void *)0)
39991 # 7264 "ssl/ssl_lib.c"
39992 )
39993 return 0;
39994
39995 if (!ssl_security(sc, (7 | (4 << 16)),
39996 EVP_PKEY_get_security_bits(dhpkey), 0, dhpkey)) {
39997 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7269,__func__), ERR_set_error)((20),(394),
39998 # 7269 "ssl/ssl_lib.c" 3 4
39999 ((void *)0)
40000 # 7269 "ssl/ssl_lib.c"
40001 );
40002 return 0;
40003 }
40004 EVP_PKEY_free(sc->cert->dh_tmp);
40005 sc->cert->dh_tmp = dhpkey;
40006 return 1;
40007 }
40008
40009 int SSL_CTX_set0_tmp_dh_pkey(SSL_CTX *ctx, EVP_PKEY *dhpkey)
40010 {
40011 if (!ssl_ctx_security(ctx, (7 | (4 << 16)),
40012 EVP_PKEY_get_security_bits(dhpkey), 0, dhpkey)) {
40013 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7281,__func__), ERR_set_error)((20),(394),
40014 # 7281 "ssl/ssl_lib.c" 3 4
40015 ((void *)0)
40016 # 7281 "ssl/ssl_lib.c"
40017 );
40018 return 0;
40019 }
40020 EVP_PKEY_free(ctx->cert->dh_tmp);
40021 ctx->cert->dh_tmp = dhpkey;
40022 return 1;
40023 }
40024
40025
40026 int SSL_handle_events(SSL *s)
40027 {
40028 SSL_CONNECTION *sc;
40029
40030
40031 if (((s) !=
40032 # 7295 "ssl/ssl_lib.c" 3 4
40033 ((void *)0)
40034 # 7295 "ssl/ssl_lib.c"
40035 && ((s)->type == 1 || (s)->type == 2)))
40036 return ossl_quic_handle_events(s);
40037
40038
40039 sc = ((s) ==
40040 # 7299 "ssl/ssl_lib.c" 3 4
40041 ((void *)0)
40042 # 7299 "ssl/ssl_lib.c"
40043 ?
40044 # 7299 "ssl/ssl_lib.c" 3 4
40045 ((void *)0)
40046 # 7299 "ssl/ssl_lib.c"
40047 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
40048 # 7299 "ssl/ssl_lib.c" 3 4
40049 ((void *)0)
40050 # 7299 "ssl/ssl_lib.c"
40051 ));
40052 if (sc !=
40053 # 7300 "ssl/ssl_lib.c" 3 4
40054 ((void *)0)
40055 # 7300 "ssl/ssl_lib.c"
40056 && ((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8))
40057 # 7309 "ssl/ssl_lib.c"
40058 return SSL_ctrl(s,74,0,
40059 # 7309 "ssl/ssl_lib.c" 3 4
40060 ((void *)0)
40061 # 7309 "ssl/ssl_lib.c"
40062 ) >= 0;
40063
40064 return 1;
40065 }
40066
40067 int SSL_get_event_timeout(SSL *s, struct timeval *tv, int *is_infinite)
40068 {
40069 SSL_CONNECTION *sc;
40070
40071
40072 if (((s) !=
40073 # 7319 "ssl/ssl_lib.c" 3 4
40074 ((void *)0)
40075 # 7319 "ssl/ssl_lib.c"
40076 && ((s)->type == 1 || (s)->type == 2)))
40077 return ossl_quic_get_event_timeout(s, tv, is_infinite);
40078
40079
40080 sc = ((s) ==
40081 # 7323 "ssl/ssl_lib.c" 3 4
40082 ((void *)0)
40083 # 7323 "ssl/ssl_lib.c"
40084 ?
40085 # 7323 "ssl/ssl_lib.c" 3 4
40086 ((void *)0)
40087 # 7323 "ssl/ssl_lib.c"
40088 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) :
40089 # 7323 "ssl/ssl_lib.c" 3 4
40090 ((void *)0)
40091 # 7323 "ssl/ssl_lib.c"
40092 ));
40093 if (sc !=
40094 # 7324 "ssl/ssl_lib.c" 3 4
40095 ((void *)0)
40096 # 7324 "ssl/ssl_lib.c"
40097 && ((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8)
40098 && SSL_ctrl(s,73,0, (void *)(tv))) {
40099 *is_infinite = 0;
40100 return 1;
40101 }
40102
40103 tv->tv_sec = 1000000;
40104 tv->tv_usec = 0;
40105 *is_infinite = 1;
40106 return 1;
40107 }
40108
40109 int SSL_get_rpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc)
40110 {
40111 SSL_CONNECTION *sc = ((s) ==
40112 # 7338 "ssl/ssl_lib.c" 3 4
40113 ((void *)0)
40114 # 7338 "ssl/ssl_lib.c"
40115 ?
40116 # 7338 "ssl/ssl_lib.c" 3 4
40117 ((void *)0)
40118 # 7338 "ssl/ssl_lib.c"
40119 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
40120 # 7338 "ssl/ssl_lib.c" 3 4
40121 ((void *)0)
40122 # 7338 "ssl/ssl_lib.c"
40123 )));
40124
40125
40126 if (((s) !=
40127 # 7341 "ssl/ssl_lib.c" 3 4
40128 ((void *)0)
40129 # 7341 "ssl/ssl_lib.c"
40130 && ((s)->type == 1 || (s)->type == 2)))
40131 return ossl_quic_get_rpoll_descriptor(s, desc);
40132
40133
40134 if (sc ==
40135 # 7345 "ssl/ssl_lib.c" 3 4
40136 ((void *)0)
40137 # 7345 "ssl/ssl_lib.c"
40138 || sc->rbio ==
40139 # 7345 "ssl/ssl_lib.c" 3 4
40140 ((void *)0)
40141 # 7345 "ssl/ssl_lib.c"
40142 )
40143 return 0;
40144
40145 return BIO_get_rpoll_descriptor(sc->rbio, desc);
40146 }
40147
40148 int SSL_get_wpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc)
40149 {
40150 SSL_CONNECTION *sc = ((s) ==
40151 # 7353 "ssl/ssl_lib.c" 3 4
40152 ((void *)0)
40153 # 7353 "ssl/ssl_lib.c"
40154 ?
40155 # 7353 "ssl/ssl_lib.c" 3 4
40156 ((void *)0)
40157 # 7353 "ssl/ssl_lib.c"
40158 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
40159 # 7353 "ssl/ssl_lib.c" 3 4
40160 ((void *)0)
40161 # 7353 "ssl/ssl_lib.c"
40162 )));
40163
40164
40165 if (((s) !=
40166 # 7356 "ssl/ssl_lib.c" 3 4
40167 ((void *)0)
40168 # 7356 "ssl/ssl_lib.c"
40169 && ((s)->type == 1 || (s)->type == 2)))
40170 return ossl_quic_get_wpoll_descriptor(s, desc);
40171
40172
40173 if (sc ==
40174 # 7360 "ssl/ssl_lib.c" 3 4
40175 ((void *)0)
40176 # 7360 "ssl/ssl_lib.c"
40177 || sc->wbio ==
40178 # 7360 "ssl/ssl_lib.c" 3 4
40179 ((void *)0)
40180 # 7360 "ssl/ssl_lib.c"
40181 )
40182 return 0;
40183
40184 return BIO_get_wpoll_descriptor(sc->wbio, desc);
40185 }
40186
40187 int SSL_net_read_desired(SSL *s)
40188 {
40189
40190 if (!((s) !=
40191 # 7369 "ssl/ssl_lib.c" 3 4
40192 ((void *)0)
40193 # 7369 "ssl/ssl_lib.c"
40194 && ((s)->type == 1 || (s)->type == 2)))
40195 return (SSL_want(s) == 3);
40196
40197 return ossl_quic_get_net_read_desired(s);
40198
40199
40200
40201 }
40202
40203 int SSL_net_write_desired(SSL *s)
40204 {
40205
40206 if (!((s) !=
40207 # 7381 "ssl/ssl_lib.c" 3 4
40208 ((void *)0)
40209 # 7381 "ssl/ssl_lib.c"
40210 && ((s)->type == 1 || (s)->type == 2)))
40211 return (SSL_want(s) == 2);
40212
40213 return ossl_quic_get_net_write_desired(s);
40214
40215
40216
40217 }
40218
40219 int SSL_set_blocking_mode(SSL *s, int blocking)
40220 {
40221
40222 if (!((s) !=
40223 # 7393 "ssl/ssl_lib.c" 3 4
40224 ((void *)0)
40225 # 7393 "ssl/ssl_lib.c"
40226 && ((s)->type == 1 || (s)->type == 2)))
40227 return 0;
40228
40229 return ossl_quic_conn_set_blocking_mode(s, blocking);
40230
40231
40232
40233 }
40234
40235 int SSL_get_blocking_mode(SSL *s)
40236 {
40237
40238 if (!((s) !=
40239 # 7405 "ssl/ssl_lib.c" 3 4
40240 ((void *)0)
40241 # 7405 "ssl/ssl_lib.c"
40242 && ((s)->type == 1 || (s)->type == 2)))
40243 return -1;
40244
40245 return ossl_quic_conn_get_blocking_mode(s);
40246
40247
40248
40249 }
40250
40251 int SSL_set1_initial_peer_addr(SSL *s, const BIO_ADDR *peer_addr)
40252 {
40253
40254 if (!((s) !=
40255 # 7417 "ssl/ssl_lib.c" 3 4
40256 ((void *)0)
40257 # 7417 "ssl/ssl_lib.c"
40258 && ((s)->type == 1 || (s)->type == 2)))
40259 return 0;
40260
40261 return ossl_quic_conn_set_initial_peer_addr(s, peer_addr);
40262
40263
40264
40265 }
40266
40267 int SSL_shutdown_ex(SSL *ssl, uint64_t flags,
40268 const SSL_SHUTDOWN_EX_ARGS *args,
40269 size_t args_len)
40270 {
40271
40272 if (!((ssl) !=
40273 # 7431 "ssl/ssl_lib.c" 3 4
40274 ((void *)0)
40275 # 7431 "ssl/ssl_lib.c"
40276 && ((ssl)->type == 1 || (ssl)->type == 2)))
40277 return SSL_shutdown(ssl);
40278
40279 return ossl_quic_conn_shutdown(ssl, flags, args, args_len);
40280
40281
40282
40283 }
40284
40285 int SSL_stream_conclude(SSL *ssl, uint64_t flags)
40286 {
40287
40288 if (!((ssl) !=
40289 # 7443 "ssl/ssl_lib.c" 3 4
40290 ((void *)0)
40291 # 7443 "ssl/ssl_lib.c"
40292 && ((ssl)->type == 1 || (ssl)->type == 2)))
40293 return 0;
40294
40295 return ossl_quic_conn_stream_conclude(ssl);
40296
40297
40298
40299 }
40300
40301 SSL *SSL_new_stream(SSL *s, uint64_t flags)
40302 {
40303
40304 if (!((s) !=
40305 # 7455 "ssl/ssl_lib.c" 3 4
40306 ((void *)0)
40307 # 7455 "ssl/ssl_lib.c"
40308 && ((s)->type == 1 || (s)->type == 2)))
40309 return
40310 # 7456 "ssl/ssl_lib.c" 3 4
40311 ((void *)0)
40312 # 7456 "ssl/ssl_lib.c"
40313 ;
40314
40315 return ossl_quic_conn_stream_new(s, flags);
40316
40317
40318
40319 }
40320
40321 SSL *SSL_get0_connection(SSL *s)
40322 {
40323
40324 if (!((s) !=
40325 # 7467 "ssl/ssl_lib.c" 3 4
40326 ((void *)0)
40327 # 7467 "ssl/ssl_lib.c"
40328 && ((s)->type == 1 || (s)->type == 2)))
40329 return s;
40330
40331 return ossl_quic_get0_connection(s);
40332
40333
40334
40335 }
40336
40337 int SSL_is_connection(SSL *s)
40338 {
40339 return SSL_get0_connection(s) == s;
40340 }
40341
40342 int SSL_get_stream_type(SSL *s)
40343 {
40344
40345 if (!((s) !=
40346 # 7484 "ssl/ssl_lib.c" 3 4
40347 ((void *)0)
40348 # 7484 "ssl/ssl_lib.c"
40349 && ((s)->type == 1 || (s)->type == 2)))
40350 return ((1U << 0) | (1U << 1));
40351
40352 return ossl_quic_get_stream_type(s);
40353
40354
40355
40356 }
40357
40358 uint64_t SSL_get_stream_id(SSL *s)
40359 {
40360
40361 if (!((s) !=
40362 # 7496 "ssl/ssl_lib.c" 3 4
40363 ((void *)0)
40364 # 7496 "ssl/ssl_lib.c"
40365 && ((s)->type == 1 || (s)->type == 2)))
40366 return
40367 # 7497 "ssl/ssl_lib.c" 3 4
40368 (18446744073709551615UL)
40369 # 7497 "ssl/ssl_lib.c"
40370 ;
40371
40372 return ossl_quic_get_stream_id(s);
40373
40374
40375
40376 }
40377
40378 int SSL_is_stream_local(SSL *s)
40379 {
40380
40381 if (!((s) !=
40382 # 7508 "ssl/ssl_lib.c" 3 4
40383 ((void *)0)
40384 # 7508 "ssl/ssl_lib.c"
40385 && ((s)->type == 1 || (s)->type == 2)))
40386 return -1;
40387
40388 return ossl_quic_is_stream_local(s);
40389
40390
40391
40392 }
40393
40394 int SSL_set_default_stream_mode(SSL *s, uint32_t mode)
40395 {
40396
40397 if (!((s) !=
40398 # 7520 "ssl/ssl_lib.c" 3 4
40399 ((void *)0)
40400 # 7520 "ssl/ssl_lib.c"
40401 && ((s)->type == 1 || (s)->type == 2)))
40402 return 0;
40403
40404 return ossl_quic_set_default_stream_mode(s, mode);
40405
40406
40407
40408 }
40409
40410 int SSL_set_incoming_stream_policy(SSL *s, int policy, uint64_t aec)
40411 {
40412
40413 if (!((s) !=
40414 # 7532 "ssl/ssl_lib.c" 3 4
40415 ((void *)0)
40416 # 7532 "ssl/ssl_lib.c"
40417 && ((s)->type == 1 || (s)->type == 2)))
40418 return 0;
40419
40420 return ossl_quic_set_incoming_stream_policy(s, policy, aec);
40421
40422
40423
40424 }
40425
40426 SSL *SSL_accept_stream(SSL *s, uint64_t flags)
40427 {
40428
40429 if (!((s) !=
40430 # 7544 "ssl/ssl_lib.c" 3 4
40431 ((void *)0)
40432 # 7544 "ssl/ssl_lib.c"
40433 && ((s)->type == 1 || (s)->type == 2)))
40434 return
40435 # 7545 "ssl/ssl_lib.c" 3 4
40436 ((void *)0)
40437 # 7545 "ssl/ssl_lib.c"
40438 ;
40439
40440 return ossl_quic_accept_stream(s, flags);
40441
40442
40443
40444 }
40445
40446 size_t SSL_get_accept_stream_queue_len(SSL *s)
40447 {
40448
40449 if (!((s) !=
40450 # 7556 "ssl/ssl_lib.c" 3 4
40451 ((void *)0)
40452 # 7556 "ssl/ssl_lib.c"
40453 && ((s)->type == 1 || (s)->type == 2)))
40454 return 0;
40455
40456 return ossl_quic_get_accept_stream_queue_len(s);
40457
40458
40459
40460 }
40461
40462 int SSL_stream_reset(SSL *s,
40463 const SSL_STREAM_RESET_ARGS *args,
40464 size_t args_len)
40465 {
40466
40467 if (!((s) !=
40468 # 7570 "ssl/ssl_lib.c" 3 4
40469 ((void *)0)
40470 # 7570 "ssl/ssl_lib.c"
40471 && ((s)->type == 1 || (s)->type == 2)))
40472 return 0;
40473
40474 return ossl_quic_stream_reset(s, args, args_len);
40475
40476
40477
40478 }
40479
40480 int SSL_get_stream_read_state(SSL *s)
40481 {
40482
40483 if (!((s) !=
40484 # 7582 "ssl/ssl_lib.c" 3 4
40485 ((void *)0)
40486 # 7582 "ssl/ssl_lib.c"
40487 && ((s)->type == 1 || (s)->type == 2)))
40488 return 0;
40489
40490 return ossl_quic_get_stream_read_state(s);
40491
40492
40493
40494 }
40495
40496 int SSL_get_stream_write_state(SSL *s)
40497 {
40498
40499 if (!((s) !=
40500 # 7594 "ssl/ssl_lib.c" 3 4
40501 ((void *)0)
40502 # 7594 "ssl/ssl_lib.c"
40503 && ((s)->type == 1 || (s)->type == 2)))
40504 return 0;
40505
40506 return ossl_quic_get_stream_write_state(s);
40507
40508
40509
40510 }
40511
40512 int SSL_get_stream_read_error_code(SSL *s, uint64_t *app_error_code)
40513 {
40514
40515 if (!((s) !=
40516 # 7606 "ssl/ssl_lib.c" 3 4
40517 ((void *)0)
40518 # 7606 "ssl/ssl_lib.c"
40519 && ((s)->type == 1 || (s)->type == 2)))
40520 return -1;
40521
40522 return ossl_quic_get_stream_read_error_code(s, app_error_code);
40523
40524
40525
40526 }
40527
40528 int SSL_get_stream_write_error_code(SSL *s, uint64_t *app_error_code)
40529 {
40530
40531 if (!((s) !=
40532 # 7618 "ssl/ssl_lib.c" 3 4
40533 ((void *)0)
40534 # 7618 "ssl/ssl_lib.c"
40535 && ((s)->type == 1 || (s)->type == 2)))
40536 return -1;
40537
40538 return ossl_quic_get_stream_write_error_code(s, app_error_code);
40539
40540
40541
40542 }
40543
40544 int SSL_get_conn_close_info(SSL *s, SSL_CONN_CLOSE_INFO *info,
40545 size_t info_len)
40546 {
40547
40548 if (!((s) !=
40549 # 7631 "ssl/ssl_lib.c" 3 4
40550 ((void *)0)
40551 # 7631 "ssl/ssl_lib.c"
40552 && ((s)->type == 1 || (s)->type == 2)))
40553 return -1;
40554
40555 return ossl_quic_get_conn_close_info(s, info, info_len);
40556
40557
40558
40559 }
40560
40561 int SSL_get_value_uint(SSL *s, uint32_t class_, uint32_t id,
40562 uint64_t *value)
40563 {
40564
40565 if (((s) !=
40566 # 7644 "ssl/ssl_lib.c" 3 4
40567 ((void *)0)
40568 # 7644 "ssl/ssl_lib.c"
40569 && ((s)->type == 1 || (s)->type == 2)))
40570 return ossl_quic_get_value_uint(s, class_, id, value);
40571
40572
40573 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7648,__func__), ERR_set_error)((20),(258),
40574 # 7648 "ssl/ssl_lib.c" 3 4
40575 ((void *)0)
40576 # 7648 "ssl/ssl_lib.c"
40577 );
40578 return 0;
40579 }
40580
40581 int SSL_set_value_uint(SSL *s, uint32_t class_, uint32_t id,
40582 uint64_t value)
40583 {
40584
40585 if (((s) !=
40586 # 7656 "ssl/ssl_lib.c" 3 4
40587 ((void *)0)
40588 # 7656 "ssl/ssl_lib.c"
40589 && ((s)->type == 1 || (s)->type == 2)))
40590 return ossl_quic_set_value_uint(s, class_, id, value);
40591
40592
40593 (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7660,__func__), ERR_set_error)((20),(258),
40594 # 7660 "ssl/ssl_lib.c" 3 4
40595 ((void *)0)
40596 # 7660 "ssl/ssl_lib.c"
40597 );
40598 return 0;
40599 }
40600
40601 int SSL_add_expected_rpk(SSL *s, EVP_PKEY *rpk)
40602 {
40603 unsigned char *data =
40604 # 7666 "ssl/ssl_lib.c" 3 4
40605 ((void *)0)
40606 # 7666 "ssl/ssl_lib.c"
40607 ;
40608 SSL_DANE *dane = SSL_get0_dane(s);
40609 int ret;
40610
40611 if (dane ==
40612 # 7670 "ssl/ssl_lib.c" 3 4
40613 ((void *)0)
40614 # 7670 "ssl/ssl_lib.c"
40615 || dane->dctx ==
40616 # 7670 "ssl/ssl_lib.c" 3 4
40617 ((void *)0)
40618 # 7670 "ssl/ssl_lib.c"
40619 )
40620 return 0;
40621 if ((ret = i2d_PUBKEY(rpk, &data)) <= 0)
40622 return 0;
40623
40624 ret = SSL_dane_tlsa_add(s, 3,
40625 1,
40626 0,
40627 data, (size_t)ret) > 0;
40628 CRYPTO_free(data, "ssl/ssl_lib.c", 7679);
40629 return ret;
40630 }
40631
40632 EVP_PKEY *SSL_get0_peer_rpk(const SSL *s)
40633 {
40634 SSL_CONNECTION *sc = ((s) ==
40635 # 7685 "ssl/ssl_lib.c" 3 4
40636 ((void *)0)
40637 # 7685 "ssl/ssl_lib.c"
40638 ?
40639 # 7685 "ssl/ssl_lib.c" 3 4
40640 ((void *)0)
40641 # 7685 "ssl/ssl_lib.c"
40642 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
40643 # 7685 "ssl/ssl_lib.c" 3 4
40644 ((void *)0)
40645 # 7685 "ssl/ssl_lib.c"
40646 )));
40647
40648 if (sc ==
40649 # 7687 "ssl/ssl_lib.c" 3 4
40650 ((void *)0)
40651 # 7687 "ssl/ssl_lib.c"
40652 || sc->session ==
40653 # 7687 "ssl/ssl_lib.c" 3 4
40654 ((void *)0)
40655 # 7687 "ssl/ssl_lib.c"
40656 )
40657 return
40658 # 7688 "ssl/ssl_lib.c" 3 4
40659 ((void *)0)
40660 # 7688 "ssl/ssl_lib.c"
40661 ;
40662 return sc->session->peer_rpk;
40663 }
40664
40665 int SSL_get_negotiated_client_cert_type(const SSL *s)
40666 {
40667 SSL_CONNECTION *sc = ((s) ==
40668 # 7694 "ssl/ssl_lib.c" 3 4
40669 ((void *)0)
40670 # 7694 "ssl/ssl_lib.c"
40671 ?
40672 # 7694 "ssl/ssl_lib.c" 3 4
40673 ((void *)0)
40674 # 7694 "ssl/ssl_lib.c"
40675 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
40676 # 7694 "ssl/ssl_lib.c" 3 4
40677 ((void *)0)
40678 # 7694 "ssl/ssl_lib.c"
40679 )));
40680
40681 if (sc ==
40682 # 7696 "ssl/ssl_lib.c" 3 4
40683 ((void *)0)
40684 # 7696 "ssl/ssl_lib.c"
40685 )
40686 return 0;
40687
40688 return sc->ext.client_cert_type;
40689 }
40690
40691 int SSL_get_negotiated_server_cert_type(const SSL *s)
40692 {
40693 SSL_CONNECTION *sc = ((s) ==
40694 # 7704 "ssl/ssl_lib.c" 3 4
40695 ((void *)0)
40696 # 7704 "ssl/ssl_lib.c"
40697 ?
40698 # 7704 "ssl/ssl_lib.c" 3 4
40699 ((void *)0)
40700 # 7704 "ssl/ssl_lib.c"
40701 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
40702 # 7704 "ssl/ssl_lib.c" 3 4
40703 ((void *)0)
40704 # 7704 "ssl/ssl_lib.c"
40705 )));
40706
40707 if (sc ==
40708 # 7706 "ssl/ssl_lib.c" 3 4
40709 ((void *)0)
40710 # 7706 "ssl/ssl_lib.c"
40711 )
40712 return 0;
40713
40714 return sc->ext.server_cert_type;
40715 }
40716
40717 static int validate_cert_type(const unsigned char *val, size_t len)
40718 {
40719 size_t i;
40720 int saw_rpk = 0;
40721 int saw_x509 = 0;
40722
40723 if (val ==
40724 # 7718 "ssl/ssl_lib.c" 3 4
40725 ((void *)0)
40726 # 7718 "ssl/ssl_lib.c"
40727 && len == 0)
40728 return 1;
40729
40730 if (val ==
40731 # 7721 "ssl/ssl_lib.c" 3 4
40732 ((void *)0)
40733 # 7721 "ssl/ssl_lib.c"
40734 || len == 0)
40735 return 0;
40736
40737 for (i = 0; i < len; i++) {
40738 switch (val[i]) {
40739 case 2:
40740 if (saw_rpk)
40741 return 0;
40742 saw_rpk = 1;
40743 break;
40744 case 0:
40745 if (saw_x509)
40746 return 0;
40747 saw_x509 = 1;
40748 break;
40749 case 1:
40750 case 3:
40751 default:
40752 return 0;
40753 }
40754 }
40755 return 1;
40756 }
40757
40758 static int set_cert_type(unsigned char **cert_type,
40759 size_t *cert_type_len,
40760 const unsigned char *val,
40761 size_t len)
40762 {
40763 unsigned char *tmp =
40764 # 7750 "ssl/ssl_lib.c" 3 4
40765 ((void *)0)
40766 # 7750 "ssl/ssl_lib.c"
40767 ;
40768
40769 if (!validate_cert_type(val, len))
40770 return 0;
40771
40772 if (val !=
40773 # 7755 "ssl/ssl_lib.c" 3 4
40774 ((void *)0)
40775 # 7755 "ssl/ssl_lib.c"
40776 && (tmp = CRYPTO_memdup((val), len, "ssl/ssl_lib.c", 7755)) ==
40777 # 7755 "ssl/ssl_lib.c" 3 4
40778 ((void *)0)
40779 # 7755 "ssl/ssl_lib.c"
40780 )
40781 return 0;
40782
40783 CRYPTO_free(*cert_type, "ssl/ssl_lib.c", 7758);
40784 *cert_type = tmp;
40785 *cert_type_len = len;
40786 return 1;
40787 }
40788
40789 int SSL_set1_client_cert_type(SSL *s, const unsigned char *val, size_t len)
40790 {
40791 SSL_CONNECTION *sc = ((s) ==
40792 # 7766 "ssl/ssl_lib.c" 3 4
40793 ((void *)0)
40794 # 7766 "ssl/ssl_lib.c"
40795 ?
40796 # 7766 "ssl/ssl_lib.c" 3 4
40797 ((void *)0)
40798 # 7766 "ssl/ssl_lib.c"
40799 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
40800 # 7766 "ssl/ssl_lib.c" 3 4
40801 ((void *)0)
40802 # 7766 "ssl/ssl_lib.c"
40803 )));
40804
40805 return set_cert_type(&sc->client_cert_type, &sc->client_cert_type_len,
40806 val, len);
40807 }
40808
40809 int SSL_set1_server_cert_type(SSL *s, const unsigned char *val, size_t len)
40810 {
40811 SSL_CONNECTION *sc = ((s) ==
40812 # 7774 "ssl/ssl_lib.c" 3 4
40813 ((void *)0)
40814 # 7774 "ssl/ssl_lib.c"
40815 ?
40816 # 7774 "ssl/ssl_lib.c" 3 4
40817 ((void *)0)
40818 # 7774 "ssl/ssl_lib.c"
40819 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls :
40820 # 7774 "ssl/ssl_lib.c" 3 4
40821 ((void *)0)
40822 # 7774 "ssl/ssl_lib.c"
40823 )));
40824
40825 return set_cert_type(&sc->server_cert_type, &sc->server_cert_type_len,
40826 val, len);
40827 }
40828
40829 int SSL_CTX_set1_client_cert_type(SSL_CTX *ctx, const unsigned char *val, size_t len)
40830 {
40831 return set_cert_type(&ctx->client_cert_type, &ctx->client_cert_type_len,
40832 val, len);
40833 }
40834
40835 int SSL_CTX_set1_server_cert_type(SSL_CTX *ctx, const unsigned char *val, size_t len)
40836 {
40837 return set_cert_type(&ctx->server_cert_type, &ctx->server_cert_type_len,
40838 val, len);
40839 }
40840
40841 int SSL_get0_client_cert_type(const SSL *s, unsigned char **t, size_t *len)
40842 {
40843 const SSL_CONNECTION *sc = ((s) ==
40844 # 7794 "ssl/ssl_lib.c" 3 4
40845 ((void *)0)
40846 # 7794 "ssl/ssl_lib.c"
40847 ?
40848 # 7794 "ssl/ssl_lib.c" 3 4
40849 ((void *)0)
40850 # 7794 "ssl/ssl_lib.c"
40851 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
40852 # 7794 "ssl/ssl_lib.c" 3 4
40853 ((void *)0)
40854 # 7794 "ssl/ssl_lib.c"
40855 )));
40856
40857 if (t ==
40858 # 7796 "ssl/ssl_lib.c" 3 4
40859 ((void *)0)
40860 # 7796 "ssl/ssl_lib.c"
40861 || len ==
40862 # 7796 "ssl/ssl_lib.c" 3 4
40863 ((void *)0)
40864 # 7796 "ssl/ssl_lib.c"
40865 )
40866 return 0;
40867
40868 *t = sc->client_cert_type;
40869 *len = sc->client_cert_type_len;
40870 return 1;
40871 }
40872
40873 int SSL_get0_server_cert_type(const SSL *s, unsigned char **t, size_t *len)
40874 {
40875 const SSL_CONNECTION *sc = ((s) ==
40876 # 7806 "ssl/ssl_lib.c" 3 4
40877 ((void *)0)
40878 # 7806 "ssl/ssl_lib.c"
40879 ?
40880 # 7806 "ssl/ssl_lib.c" 3 4
40881 ((void *)0)
40882 # 7806 "ssl/ssl_lib.c"
40883 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls :
40884 # 7806 "ssl/ssl_lib.c" 3 4
40885 ((void *)0)
40886 # 7806 "ssl/ssl_lib.c"
40887 )));
40888
40889 if (t ==
40890 # 7808 "ssl/ssl_lib.c" 3 4
40891 ((void *)0)
40892 # 7808 "ssl/ssl_lib.c"
40893 || len ==
40894 # 7808 "ssl/ssl_lib.c" 3 4
40895 ((void *)0)
40896 # 7808 "ssl/ssl_lib.c"
40897 )
40898 return 0;
40899
40900 *t = sc->server_cert_type;
40901 *len = sc->server_cert_type_len;
40902 return 1;
40903 }
40904
40905 int SSL_CTX_get0_client_cert_type(const SSL_CTX *ctx, unsigned char **t, size_t *len)
40906 {
40907 if (t ==
40908 # 7818 "ssl/ssl_lib.c" 3 4
40909 ((void *)0)
40910 # 7818 "ssl/ssl_lib.c"
40911 || len ==
40912 # 7818 "ssl/ssl_lib.c" 3 4
40913 ((void *)0)
40914 # 7818 "ssl/ssl_lib.c"
40915 )
40916 return 0;
40917
40918 *t = ctx->client_cert_type;
40919 *len = ctx->client_cert_type_len;
40920 return 1;
40921 }
40922
40923 int SSL_CTX_get0_server_cert_type(const SSL_CTX *ctx, unsigned char **t, size_t *len)
40924 {
40925 if (t ==
40926 # 7828 "ssl/ssl_lib.c" 3 4
40927 ((void *)0)
40928 # 7828 "ssl/ssl_lib.c"
40929 || len ==
40930 # 7828 "ssl/ssl_lib.c" 3 4
40931 ((void *)0)
40932 # 7828 "ssl/ssl_lib.c"
40933 )
40934 return 0;
40935
40936 *t = ctx->server_cert_type;
40937 *len = ctx->server_cert_type_len;
40938 return 1;
40939 }
40940